Conversation
- Removed secondary key mismatch error codes and related checks, as the composite key semantics now encompass previous secondary key behaviors. - Updated the `nanots_writer` and `nanots_iterator` classes to handle composite keys (timestamp, secondary_key) for ordering and searching. - Modified tests to reflect the new composite key logic, including duplicate timestamps and default secondary key behavior. - Adjusted C API functions to align with the new iterator find functionality that accepts both timestamp and secondary key.
- Updated `nanots_writer::free_blocks` to accept a secondary key range for block deletion, allowing for more granular control over which blocks to remove based on both timestamp and secondary key. - Modified `nanots_reader::read`, `query_stream_tags`, and `query_contiguous_segments` methods to include secondary key parameters, enabling reads and queries to consider both timestamp and secondary key ranges. - Adjusted the corresponding C API functions to match the new method signatures and behavior. - Updated unit tests to validate the new functionality, ensuring that both timestamp and secondary key ranges are correctly handled in various scenarios. - Enhanced documentation to reflect the changes in method signatures and usage patterns for the new composite key functionality.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces a major upgrade to the NanoTS time-series database, focusing on a new on-disk format (v2) and support for composite (timestamp, secondary_key) ordering. The changes are reflected in both the codebase (
amalgamated_src/nanots.h) and documentation (README.md), enabling advanced use cases where timestamps may not be unique. The API is expanded to support composite-key operations throughout writing, reading, seeking, and deletion. The new format is not backward-compatible with v1.