Skip to content

Various fixes and improvements#78

Merged
satta merged 3 commits intomasterfrom
fixes-and-improvements
Jan 9, 2026
Merged

Various fixes and improvements#78
satta merged 3 commits intomasterfrom
fixes-and-improvements

Conversation

@satta
Copy link
Member

@satta satta commented Jan 9, 2026

This MR introduces the following changes:

  • Add early prefix check in blb_rocksdb_query_by_i() to break out of the iterator loop immediately when keys no longer match the seek prefix. This avoids unnecessary iteration and parsing of keys that are lexicographically close but cannot match
  • Fix GCC -Wuse-after-free warning by capturing the old pointer address as uintptr_t before calling realloc(), then logging the integer value instead of the potentially-freed pointer.
  • balboa-backend-console: add -l option to set query result limit as well as add documentation for the query command in usage text

satta added 3 commits January 9, 2026 14:08
Before parsing each key, verify that it still matches the seek prefix.
This avoids iterating through keys that are lexicographically close but
cannot match. This significantly improves performance for queries for
non-existent prefixes that have many shorter prefix matches in the
database.
@satta satta assigned 0mbi and fhonza Jan 9, 2026
@satta satta merged commit 6c0ef4c into master Jan 9, 2026
7 checks passed
@satta satta deleted the fixes-and-improvements branch January 9, 2026 15:12
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.

3 participants

Comments