Draft
Conversation
df861bc to
4dbc63a
Compare
…the expected speedup
…ator communication; don't see speedup when increasing of thread num
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.
Delta protocol for Octo updates
Defined concrete delta types and promotion thresholds in
src/sketches/octo_delta.rs:CmDelta { row, col, value }CountDelta { row, col, value }HllDelta { pos, value }CM_PROMASK,COUNT_PROMASK,HLL_PROMASKThis gives a common transport contract between worker-side updates and parent-side aggregation.
Worker-side delta emission APIs (
insert_emit_delta)Implemented sketch-level delta emission functions:
CountMin::insert_emit_deltaCount::insert_emit_deltaHyperLogLog::insert_emit_deltaThese functions perform normal insert logic while emitting delta records suitable for inter-thread transport.
Parent-side delta application APIs (
apply_delta)Implemented parent merge primitives:
CountMin::apply_deltaCount::apply_deltaHyperLogLog::apply_deltaThese are the aggregation-side operations consumed by the Octo runtime.
Octo runtime engine (
OctoCore/OctoRuntime)In
src/sketch_framework/octo.rs:OctoReadHandle::with_parent(...)Usable APIs for both execution styles
run_octo(...)OctoRuntime::new,insert,insert_batch,finishDelta emission behavior at threshold/improvement
apply_delta correctness
run_octo behavior for CMS/CS/HLL
Single-worker edge case
Streaming-vs-batch consistency
Runtime lifecycle behavior (close idempotence, insert-after-close panic)
Live read-handle observation semantics
Related sketch-level tests also cover insert_emit_delta/apply_delta behavior in CMS/CS/HLL files.
Current Limitations / Known Issues
Thread communication overhead in OctoCore remains a bottleneck.
In current benchmarking, Octo-style execution is not yet faster than full-merge baseline.
queue_capacity remains a compatibility field; transport currently uses unbounded MPSC.
Why This Is Still Valuable
Even without current speedup, this PR establishes the full functional Octo path:
clear delta contract,
sketch-native emit/apply primitives,
generic runtime interfaces