# Recommended usage of get\_range\_split\_points or GetRangeSplitPoints

**URL:** <https://forums.foundationdb.org/t/recommended-usage-of-get-range-split-points-or-getrangesplitpoints/2593>\
**Category:** Using FoundationDB\
**Created:** [March 2, 2021, 6:16am UTC](https://forums.foundationdb.org/t/recommended-usage-of-get-range-split-points-or-getrangesplitpoints/2593 "2021-03-02T06:16:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![harikb](https://sea1.discourse-cdn.com/foundationdb/user_avatar/forums.foundationdb.org/harikb/32/1033_2.png) [@harikb](https://forums.foundationdb.org/u/harikb)\
**Post date:** [March 2, 2021, 6:16am UTC](https://forums.foundationdb.org/t/recommended-usage-of-get-range-split-points-or-getrangesplitpoints/2593/1 "2021-03-02T06:16:20Z")

</div>

Hello,

I am experimenting with the Go bindings GetRangeSplitPoints (which wraps C.fdb\_transaction\_get\_range\_split\_points ) and couldn’t figure out the expected usage pattern. I tried to get a range split across the entire db (’’ to xFF) and the call seems to take a while (i killed after a minute on each try). DB is about 10G with sample/placeholder data. I tried various chunkSize-s , 100k, 1mb, 1g, 10g and was expecting, probably naively, to get a range slice with which i can later query using GetRange() without hitting the 5 second timeout. For my tests though, even 10 minutes is a perfectly valid if that is what it takes to get the ranges. I let it ran for 2 hrs and then a traceback showed that it is waiting on a future that is never resolved

```
github.com/apple/foundationdb/bindings/go/src/fdb.fdb_future_block_until_ready(0x1c05840)

```

What is the ideal/appropriate use of this method?

I understand the data retrieved this way would be inconsistent since it spans many transaction, but at this point, I am merely experimenting with APIs to understand what is possible.

Thanks

–

Hari

---

<div class="post-metadata">

**Author:** ![andrew.noyes](https://sea1.discourse-cdn.com/foundationdb/user_avatar/forums.foundationdb.org/andrew.noyes/32/443_2.png) [@andrew.noyes](https://forums.foundationdb.org/u/andrew.noyes)\
**Post date:** [March 2, 2021, 6:22am UTC](https://forums.foundationdb.org/t/recommended-usage-of-get-range-split-points-or-getrangesplitpoints/2593/2 "2021-03-02T06:22:05Z")

</div>

You might be running into [getRangeSplitPoints is missing from FuzzApiCorrectness · Issue #4167 · apple/foundationdb · GitHub](https://github.com/apple/foundationdb/issues/4167). You can work around this by using the [locality api](https://apple.github.io/foundationdb/api-python.html#module-fdb.locality)`get_boundary_keys` function. (there should be an equivalent in go)

---

<div class="post-metadata">

**Author:** ![mdianjun](https://sea1.discourse-cdn.com/foundationdb/user_avatar/forums.foundationdb.org/mdianjun/32/1456_2.png) [@mdianjun](https://forums.foundationdb.org/u/mdianjun)\
**Post date:** [February 14, 2023, 3:52am UTC](https://forums.foundationdb.org/t/recommended-usage-of-get-range-split-points-or-getrangesplitpoints/2593/3 "2023-02-14T03:52:41Z")

</div>

The API fdb\_transaction\_get\_range\_split\_points() has a problem:  
When storage server is wiggling，it returns wrong\_shard\_server, then fdb client failed at `wait(waitForAll(fReplies));` [foundationdb/NativeAPI.actor.cpp at 7.1.23 · apple/foundationdb · GitHub](https://github.com/apple/foundationdb/blob/7.1.23/fdbclient/NativeAPI.actor.cpp#L7458)

getRangeSplitPoints() will retry until timeout occurs.

I think the API fdb\_transaction\_get\_range\_split\_points() is not stable in this case. Any improvement proposal? Thanks!
