Skip to content

Make add value optional and stop writing it in consensusOrderedCollection #24264

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

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

scarlettjlee
Copy link
Contributor

@scarlettjlee scarlettjlee commented Apr 5, 2025

Stop sending value in add op since it has long been replaced by deserializedValue which is needed for GC. AB#7149

Question for reviewers: are additional tests needed? Looks like there is already coverage in handle tests for ConsensusQueue.

@scarlettjlee scarlettjlee self-assigned this Apr 5, 2025
@Copilot Copilot AI review requested due to automatic review settings April 5, 2025 04:02
@github-actions github-actions bot added area: dds Issues related to distributed data structures base: main PRs targeted against main branch labels Apr 5, 2025
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (2)

packages/dds/ordered-collection/src/consensusOrderedCollection.ts:144

  • Consider reusing the already computed 'valueSer' instead of calling serializeValue() again in the not-attached branch to avoid redundant computation.
const addValue = this.deserializeValue(

packages/dds/ordered-collection/src/consensusOrderedCollection.ts:153

  • Verify that the removal of the 'value' field from the submitted operation aligns with all consumers' expectations and does not break any legacy code segments.
deserializedValue: value,

Copy link
Contributor

@jzaffiro jzaffiro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes seem fine to me - in terms of tests, are there any implementations of ConsensusOrderedCollection other than ConsensusQueue? The handleValidation suite only tests storing handles in ConsensusQueue, but if that's the only implementation then I think those tests should be sufficient.

@scarlettjlee
Copy link
Contributor Author

Changes seem fine to me - in terms of tests, are there any implementations of ConsensusOrderedCollection other than ConsensusQueue? The handleValidation suite only tests storing handles in ConsensusQueue, but if that's the only implementation then I think those tests should be sufficient.

I don't think so. I checked around, although I might have missed a partner usage.

@scarlettjlee scarlettjlee enabled auto-merge (squash) April 15, 2025 21:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: dds Issues related to distributed data structures base: main PRs targeted against main branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants