-
Notifications
You must be signed in to change notification settings - Fork 77
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
datastore: DomainGetAsOfQuery #2680
Conversation
3a0be9e
to
6606785
Compare
99f9c30
to
0dfa5fc
Compare
0dfa5fc
to
b738738
Compare
return value; | ||
} | ||
|
||
std::optional<std::pair<size_t, uint64_t>> EliasFanoList32::seek([[maybe_unused]] uint64_t v, bool reverse) const { |
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.
[[maybe_unused]]
is probably a leftover here
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.
yes, forgot to remove
kvdb::EncoderConcept TKeyEncoder1, snapshots::EncoderConcept TKeyEncoder2, | ||
kvdb::DecoderConcept TValueDecoder1, snapshots::DecoderConcept TValueDecoder2, | ||
const snapshots::SegmentAndAccessorIndexNames* segment_names> | ||
struct HistoryGetQuery { |
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.
HistorySeekQuery
would be a better name for both capturing the semantics and keeping consistency wrt Erigon.
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.
I understand the desire to align with Erigon. I've called it Get on purpose, because I think Erigon's naming of this API is inconsistent wrt mdbx seek operation and should be renamed to Get. In my mind the difference is that Get (if it succeeds) returns an exact value matching the query parameters (so the query is like: SELECT * WHERE A = 123 LIMIT 1
), but Seek can return something that is not an exact match (so the query is like: SELECT * WHERE A >= 123 LIMIT 1
). We also call it lower_bound
in some places. Additionally, in my mind Seek should reposition a cursor/iterator to be able to continue iteration from that point on (like fseek). I consider HistoryGetQuery as a close friend of DomainPut/Get.
No description provided.