Optimize out degree count query#646
Open
adsharma wants to merge 8 commits into
Open
Conversation
…gration Instead of throwing RuntimeException when a WAL record's declared length is shorter than what the current deserializer expects (e.g. v42->v43), enforce the readLimit at the Deserializer::read() level. If a read would exceed the declared record boundary, only the available bytes are read from the stream and the remainder of the output buffer is zero-filled. This gives new fields default (zero) values and keeps the stream positioned at the correct record boundary, so the next record in the WAL is not corrupted during replay or checkpoint. Key changes: - Deserializer::read() truncates reads at the readLimit boundary - deserializeValue<T>() and the std::string specialization route through the enforcing read() method instead of reader->read() directly - skipReadLimit() no longer throws (the over-read case cannot occur) - WALRecordDeserializeHandlesSizeMismatch test verifies silent handling with correct stream positioning
81948a2 to
36d671c
Compare
36d671c to
695a7a8
Compare
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.
If your node table is sorted by primary key, we can avoid joins and CSR indptr to answer.
Note that you have to ensure the following invariant for correctness:
So it's more than just sorting in ascending order.
Before:
after: