-
Notifications
You must be signed in to change notification settings - Fork 21
CNDB-14802: Improve async byte allocation estimates in SAI SegmentBuilder #2002
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Checklist before you submit for review
|
d3e5c2b to
8edfac0
Compare
|
Some of the tests are failing for unrelated reasons. I pushed a fix for those here #2007 |
|
Merged in |
We no longer block until the first insertion completes, and as such, we need to make sure that isEmpty correctly accounts for inflight inserts. This fixes a flaky test (only flaky for this branch) in the FeaturesVersionSupportTest.
|
eolivelli
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should probably improve test coverage on this patch, it seems that we have improved only one existing unit test
| while (condition.get()) | ||
| { | ||
| if (timeoutMs-- <= 0) | ||
| throw new RuntimeException("Timeout while waiting for condition"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we have unit tests that cover this condition ?
a RuntimeException will bubble up and hit any place in the code
would it be better to return false and handle the timeout explicitly ?



What is the issue
https://github.com/riptano/cndb/issues/14802
What does this PR fix and why was it fixed
This fix works in collaboration with datastax/jvector#521. Specifically, it focuses on removing the estimation aspect of the memory management and instead works by reserving more memory than is expected to be needed, then adjusting the real usage once the actual value of memory required is known. This should help reduce cases where we exceed the bytes used.