apple / apple/foundationdb

GetEstimatedRangeSizeBytes can cause PacketLimitExceeded error on commit proxies

Open
#11,384 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
16.7k
Forks
1.6k
Avg merge
1d 20h
Merged PRs (30d)
126

Description

As reported [here](https://forums.foundationdb.org/t/packetlimitexceeded-error-on-stateless-servers/4188/15), if `GetEstimatedRangeSizeBytes` API uses a large key range, it can cause `PacketLimitExceeded` errors on commit proxies. This is because `getStorageMetricsLargeKeyRange()` invokes `getKeyRangeLocations()` to obtain location information for all shards within the specified key range. For a large range, the size of location information is unbounded and may exceed the packet size limit.

Contributor guide

Open the contributing guide

Research direction

Start by reading GetEstimatedRangeSizeBytes, getStorageMetricsLargeKeyRange(), and getKeyRangeLocations() to trace how location information is gathered for a large range. Reproduce or inspect the PacketLimitExceeded path on commit proxies, then define completion as handling large ranges without exceeding the packet limit and verifying the behavior with regression coverage.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
databases, distributed-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.