Skip to content

Accept search_buffer_capacity < search_window_size - #449

Open
mihaic wants to merge 1 commit into
intel:mainfrom
mihaic:raise-search-buffer-capacity
Open

mihaic wants to merge 1 commit into
intel:mainfrom
mihaic:raise-search-buffer-capacity

Conversation

@mihaic

@mihaic mihaic commented Oct 23, 2026

Copy link
Copy Markdown
Member

Silently raise such a search_buffer_capacity to search_window_size.

This PR changes the API by removing the public SearchBufferConfig constructor that bypassed check_invariants (which was not supposed to be public) and the public check_invariants method (which is now superfluous). They are not used in Redis.

Silently raise such a search_buffer_capacity to search_window_size.

This PR changes the API by removing the public SearchBufferConfig
constructor that bypassed check_invariants (which was not supposed to be public) and the public check_invariants method (which is now superfluous). They are not used in Redis.
@mihaic

mihaic commented Oct 23, 2026

Copy link
Copy Markdown
Member Author

It's expected that the C++ runtime bindings test will fail when compiling from the static library, because that has the old behavior.

constexpr SearchBufferConfig() = default;

SearchBufferConfig(
BypassInvariantCheckTag, size_t search_window_size, size_t total_capacity

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems to conflict with #486, which reject capacity < window?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It can be seen as a conflict, indeed.

I see this PR as generally accepting capacity < window in all cases, like when build parameters are superseded by search parameters with only a search window size larger than the build parameters capacity. Basically, this PR makes it easier to change the window without considering capacity.

Instead, PR #486 rejects capacity < window only when explicitly setting the capacity. If the client wants a specific capacity, the explicit setting should not succeed. If you see it differently, we can change it.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants