Skip to content

Cleanup of MinSyncedTicket and MaxCreatedAtMapByActor After Version Vector Migration #969

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 3 commits into
base: main
Choose a base branch
from

Conversation

chacha912
Copy link
Contributor

@chacha912 chacha912 commented Apr 2, 2025

What this PR does / why we need it?

This PR cleans up legacy fields and functionality that were retained for backward compatibility during the transition from Lamport timestamps to Version Vectors.

Any background context you want to provide?

What are the relevant tickets?

Related yorkie-team/yorkie#1208

Checklist

  • Added relevant tests or not required
  • Addressed and resolved all CodeRabbit review comments
  • Didn't break anything

Summary by CodeRabbit

  • Refactor
    • Streamlined document operations for text editing and tree management by removing legacy timestamp tracking and outdated sync logic.
  • Documentation
    • Updated API resources to mark obsolete fields as deprecated, guiding users toward current best practices.
  • Chores
    • Cleaned up unused properties and simplified method interfaces across editing and styling operations for improved clarity and maintainability.

Copy link

coderabbitai bot commented Apr 2, 2025

Walkthrough

The changes remove legacy handling of actor-specific creation timestamps and the minSyncedTicket field. In the API layer, the conversion functions no longer process or include the createdAtMapByActor data, and corresponding Protobuf fields are now marked as deprecated. Similar removals occur in the CRDT, JSON, and operation modules, where parameters, return values, and member properties related to maxCreatedAtMapByActor have been eliminated. Legacy logic for version vector support in change syncing is also simplified or removed, resulting in streamlined method signatures and reduced complexity.

Changes

File(s) Change Summary
packages/sdk/src/api/…/converter.ts Removed logic for handling createdAtMapByActor and the minSyncedTicket field in conversions between internal operations and Protobuf formats.
packages/sdk/src/api/yorkie/v1/resources.proto Added deprecation comments to the min_synced_ticket and created_at_map_by_actor fields in multiple messages to indicate they are no longer recommended.
packages/sdk/src/api/yorkie/v1/resources_pb.ts Marked fields such as min_synced_ticket and created_at_map_by_actor as deprecated in various classes, updating their comments and documentation without altering functionality.
packages/sdk/src/document/change/change_id.ts Removed legacy conditional logic for generating version vectors, simplifying the syncClocks method.
packages/sdk/src/document/change/change_pack.ts Removed the minSyncedTicket property, constructor parameter, and its accessor method from the ChangePack class.
packages/sdk/src/document/crdt/rga_tree_split.ts Removed the maxCreatedAt parameter from methods (canDelete, canStyle, edit, deleteNodes), streamlining node existence and deletion logic.
packages/sdk/src/document/crdt/text.ts Removed the maxCreatedAtMapByActor parameter from the edit and setStyle methods and adjusted return types accordingly.
packages/sdk/src/document/crdt/tree.ts Removed maxCreatedAt and maxCreatedAtMapByActor parameters from methods (canDelete, canStyle, style, removeStyle, edit), simplifying control flow for tree node operations.
packages/sdk/src/document/json/text.ts Omitted the extraction of maxCreatedAtMapByActor in destructuring the return values of the edit and setStyle methods.
packages/sdk/src/document/json/tree.ts Removed references to maxCreatedAtMapByActor from method return values and internal variable assignments in tree manipulation methods.
packages/sdk/src/document/operation/edit_operation.ts Eliminated the maxCreatedAtMapByActor property and its handling from the constructor, static create method, and removed the associated accessor function in the EditOperation class.
packages/sdk/src/document/operation/style_operation.ts Removed the maxCreatedAtMapByActor property and parameter from the constructor and static method, and deleted its accessor method in the StyleOperation class.
packages/sdk/src/document/operation/tree_edit_operation.ts Removed the maxCreatedAtMapByActor property and its constructor and static method parameters, along with the respective accessor method in the TreeEditOperation class.
packages/sdk/src/document/operation/tree_style_operation.ts Removed the maxCreatedAtMapByActor parameter from the constructor and static methods (create and createTreeRemoveStyleOperation) and eliminated its accessor method in the TreeStyleOperation class, streamlining operation instantiation and execution.

Possibly related PRs

Suggested reviewers

  • JOOHOJANG
  • hackerwins

Poem

I'm a little rabbit, hopping with glee,
Cleaning up code so clean and free.
No more maps of timestamps to trace,
Simpler operations set a lighter pace.
In fields deprecated, a new breeze flows—
Hop along, dear coder, where logic grows!
🐇✨

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

packages/sdk/src/document/change/change_id.ts

Oops! Something went wrong! :(

ESLint: 8.57.1

ESLint couldn't find the plugin "@typescript-eslint/eslint-plugin".

(The package "@typescript-eslint/eslint-plugin" was not found when loaded as a Node module from the directory "/packages/sdk".)

It's likely that the plugin isn't installed correctly. Try reinstalling by running the following:

npm install @typescript-eslint/eslint-plugin@latest --save-dev

The plugin "@typescript-eslint/eslint-plugin" was referenced from the config file in "packages/sdk/.eslintrc.js » ../../.eslintrc.js".

If you still can't figure out the problem, please stop by https://eslint.org/chat/help to chat with the team.

packages/sdk/src/document/crdt/text.ts

Oops! Something went wrong! :(

ESLint: 8.57.1

ESLint couldn't find the plugin "@typescript-eslint/eslint-plugin".

(The package "@typescript-eslint/eslint-plugin" was not found when loaded as a Node module from the directory "/packages/sdk".)

It's likely that the plugin isn't installed correctly. Try reinstalling by running the following:

npm install @typescript-eslint/eslint-plugin@latest --save-dev

The plugin "@typescript-eslint/eslint-plugin" was referenced from the config file in "packages/sdk/.eslintrc.js » ../../.eslintrc.js".

If you still can't figure out the problem, please stop by https://eslint.org/chat/help to chat with the team.

packages/sdk/src/api/yorkie/v1/resources_pb.ts

Oops! Something went wrong! :(

ESLint: 8.57.1

ESLint couldn't find the plugin "@typescript-eslint/eslint-plugin".

(The package "@typescript-eslint/eslint-plugin" was not found when loaded as a Node module from the directory "/packages/sdk".)

It's likely that the plugin isn't installed correctly. Try reinstalling by running the following:

npm install @typescript-eslint/eslint-plugin@latest --save-dev

The plugin "@typescript-eslint/eslint-plugin" was referenced from the config file in "packages/sdk/.eslintrc.js » ../../.eslintrc.js".

If you still can't figure out the problem, please stop by https://eslint.org/chat/help to chat with the team.

  • 7 others

📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2799b8b and 0a94654.

📒 Files selected for processing (14)
  • packages/sdk/src/api/converter.ts (0 hunks)
  • packages/sdk/src/api/yorkie/v1/resources.proto (5 hunks)
  • packages/sdk/src/api/yorkie/v1/resources_pb.ts (5 hunks)
  • packages/sdk/src/document/change/change_id.ts (1 hunks)
  • packages/sdk/src/document/change/change_pack.ts (0 hunks)
  • packages/sdk/src/document/crdt/rga_tree_split.ts (7 hunks)
  • packages/sdk/src/document/crdt/text.ts (5 hunks)
  • packages/sdk/src/document/crdt/tree.ts (11 hunks)
  • packages/sdk/src/document/json/text.ts (2 hunks)
  • packages/sdk/src/document/json/tree.ts (4 hunks)
  • packages/sdk/src/document/operation/edit_operation.ts (1 hunks)
  • packages/sdk/src/document/operation/style_operation.ts (1 hunks)
  • packages/sdk/src/document/operation/tree_edit_operation.ts (0 hunks)
  • packages/sdk/src/document/operation/tree_style_operation.ts (1 hunks)
💤 Files with no reviewable changes (3)
  • packages/sdk/src/document/change/change_pack.ts
  • packages/sdk/src/document/operation/tree_edit_operation.ts
  • packages/sdk/src/api/converter.ts
🧰 Additional context used
🧬 Code Definitions (1)
packages/sdk/src/document/crdt/text.ts (3)
packages/sdk/src/document/crdt/gc.ts (1)
  • GCPair (23-26)
packages/sdk/src/document/crdt/rga_tree_split.ts (1)
  • RGATreeSplitPosRange (243-243)
packages/sdk/src/document/time/ticket.ts (1)
  • MaxLamport (186-186)
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: build (18.x)
🔇 Additional comments (49)
packages/sdk/src/document/change/change_id.ts (1)

85-98: Simplified syncClocks method by removing legacy version vector handling

The method has been streamlined by directly calculating the maximum version vector using this.versionVector.max(other.versionVector), eliminating previous conditional logic that handled legacy SDK changes created prior to version 0.5.2 (which lacked version vectors). This change aligns with the PR's objective of removing backward compatibility code after completing the migration from Lamport timestamps to Version Vectors.

packages/sdk/src/document/json/text.ts (2)

117-122: Removed unused maxCreatedAtMapByActor from edit method

The destructuring assignment has been simplified by removing the maxCreatedAtMapByActor variable that's no longer needed. This change is part of the broader cleanup of legacy timestamp handling following the Version Vector migration.


185-185: Removed unused maxCreatedAtMapByActor from setStyle method

Similar to the edit method, the destructuring assignment in setStyle has been simplified by removing the maxCreatedAtMapByActor variable that's no longer needed after the migration to Version Vectors.

packages/sdk/src/api/yorkie/v1/resources_pb.ts (5)

222-224: Appropriate deprecation comment for minSyncedTicket field.

The deprecation comment is properly added to the minSyncedTicket field in the ChangePack class, which aligns with the PR objective of removing legacy fields after the Version Vector migration.


772-774: Correctly marked createdAtMapByActor as deprecated in Operation_Edit.

Proper deprecation comment added to the createdAtMapByActor field in the Operation_Edit class. This is consistent with the goal of removing actor-specific creation timestamps.


917-919: Appropriately deprecated createdAtMapByActor in Operation_Style.

The deprecation comment for the createdAtMapByActor field in the Operation_Style class is properly added, which is in line with other similar changes.


1025-1027: Correctly marked createdAtMapByActor as deprecated in Operation_TreeEdit.

The deprecation comment for the createdAtMapByActor field in the Operation_TreeEdit class is properly added, maintaining consistency across the codebase.


1115-1117: Appropriate deprecation comment for createdAtMapByActor in Operation_TreeStyle.

The deprecation comment for the createdAtMapByActor field in the Operation_TreeStyle class is correctly added, completing the consistent deprecation of this field across all relevant operation classes.

packages/sdk/src/document/operation/style_operation.ts (1)

93-98:

✅ Verification successful

Correctly removed maxCreatedAtMapByActor parameter from setStyle call.

The setStyle method call has been updated to no longer include the maxCreatedAtMapByActor parameter, which is consistent with the PR's objective of removing legacy fields related to Lamport timestamps and actor-specific creation timestamps.


🏁 Script executed:

#!/bin/bash
# Verify that the CRDTText.setStyle method signature has been updated to match this call
# and that similar changes have been made in other operation classes

# Check the CRDTText setStyle method signature
echo "Checking CRDTText setStyle method signature..."
rg -A 10 "setStyle.*?\(" --type typescript packages/sdk/src/document/crdt/text.ts

# Check for similar changes in other operation classes
echo "Checking for similar changes in other operation classes..."
rg -l "maxCreatedAtMapByActor" --type typescript packages/sdk/src/document/operation/

Length of output: 469


Below is a final rewritten review comment based on the additional verification steps. Note that the initial shell script needed adjustments (using the correct file extension instead of the unrecognized “typescript” file type). The updated verification, after using the proper file paths for TypeScript files, confirms that the CRDTText.setStyle method signature correctly omits the legacy maxCreatedAtMapByActor parameter and that similar changes are consistently applied in other operation classes.

Final Review Comment:

  • The update correctly removes the legacy maxCreatedAtMapByActor parameter from the setStyle call in packages/sdk/src/document/operation/style_operation.ts (lines 93-98).
  • Verification shows that the CRDTText.setStyle method signature in packages/sdk/src/document/crdt/text.ts now matches the updated call.
  • No remaining occurrences of maxCreatedAtMapByActor were found in other operation classes.
packages/sdk/src/document/crdt/text.ts (6)

227-227: Method signature simplified

The return type has been simplified to remove maxCreatedAtMapByActor, streamlining the API as part of the cleanup after the version vector migration.


235-240: Simplified method call

The call to this.rgaTreeSplit.edit no longer passes the maxCreatedAtMapByActor parameter, aligning with the version vector implementation. This is a clean simplification that maintains functionality while removing legacy code.


256-256: Simplified return value

Return statement properly updated to match the new signature by returning just [changes, pairs, [caretPos, caretPos]] without the previously included maxCreatedAtMapByActor.


274-274: Simplified method signature

The return type for setStyle has been updated to remove maxCreatedAtMapByActor, consistent with the cleanup of legacy fields throughout the codebase.


289-296: Improved versioning logic

The logic has been updated to use MaxLamport as a default value and check against the version vector rather than using the now-removed maxCreatedAtMapByActor. This simplifies the code while maintaining proper versioning control.


328-328: Simplified return statement

Updated return statement matches the new method signature by only returning [pairs, changes] without the previously included maxCreatedAtMapByActor.

packages/sdk/src/document/json/tree.ts (4)

317-320: Simplified method call and return handling

The call to this.tree!.style now properly destructures only pairs from the return value, and the subsequent logic for registering GC pairs has been simplified to remove handling of the now-deprecated maxCreatedAtMapByActor.


360-363: Simplified return handling

The destructuring pattern has been updated to only extract pairs from the style method return, consistent with the removal of maxCreatedAtMapByActor throughout the codebase.


402-410: Simplified method call and return handling

The call to this.tree!.removeStyle now correctly destructures only pairs instead of both maxCreatedAtMapByActor and pairs, aligning with the cleanup of legacy fields.


461-473: Simplified method call and return handling

The call to this.tree!.edit now properly destructures only pairs from the return value without including maxCreatedAtMapByActor, consistent with the version vector migration cleanup.

packages/sdk/src/api/yorkie/v1/resources.proto (5)

47-47: Proto field properly marked as deprecated

The min_synced_ticket field is now marked as deprecated in the protocol definition, which is the correct approach for maintaining backward compatibility while signaling that this field should not be used in new code.


99-99: Proto field properly marked as deprecated

The created_at_map_by_actor field in the Edit message is now marked as deprecated, consistent with the removal of this functionality from the TypeScript implementation.


120-120: Proto field properly marked as deprecated

The created_at_map_by_actor field in the Style message is now marked as deprecated, consistent with the version vector migration cleanup.


131-131: Proto field properly marked as deprecated

The created_at_map_by_actor field in the TreeEdit message is now marked as deprecated, maintaining protocol compatibility while indicating it will be removed in future versions.


143-143: Proto field properly marked as deprecated

The created_at_map_by_actor field in the TreeStyle message is now marked as deprecated, completing the consistent deprecation of these fields across all operation types.

packages/sdk/src/document/operation/edit_operation.ts (1)

100-106: Updated to match new method signature

The destructuring of the return value from text.edit has been updated to only extract changes and pairs, aligning with the removal of maxCreatedAtMapByActor from the method signature in CRDTText.

packages/sdk/src/document/operation/tree_style_operation.ts (2)

127-132: Clean parameter removal from tree.style method call

The removal of maxCreatedAtMapByActor parameter from the tree.style method call aligns with the PR objective of removing legacy functionality that was maintained for backward compatibility during the Version Vector migration.


136-141: Clean parameter removal from tree.removeStyle method call

The removal of maxCreatedAtMapByActor parameter from the tree.removeStyle method call is consistent with the cleanup goals of this PR, streamlining the codebase by removing fields that are no longer needed.

packages/sdk/src/document/crdt/rga_tree_split.ts (8)

448-450: Simplified node existence check in canDelete

The node existence logic has been simplified to rely solely on comparing the node's lamport timestamp with clientLamportAtChange, removing the now-redundant maxCreatedAt check that was previously needed for backward compatibility.


465-467: Simplified node existence check in canStyle

Similar to the change in canDelete, the node existence logic in canStyle has been streamlined to only check the node's creation timestamp against clientLamportAtChange, removing legacy complexity.


554-562: Updated edit method signature and return type

The return type of the edit method has been updated to remove maxCreatedAtMapByActor, simplifying the method interface while maintaining all necessary functionality.


568-572: Simplified deleteNodes method call

The deleteNodes method call has been updated to align with its new signature, removing the maxCreatedAtMapByActor parameter which is no longer needed after the Version Vector migration.


609-610: Updated return statement in edit method

The return statement now correctly matches the updated method signature, returning only the essential elements: caret position, garbage collection pairs, and changes.


882-885: Simplified deleteNodes method return type

The return type of the deleteNodes method has been updated to remove the now-unnecessary maxCreatedAtMapByActor, streamlining the interface.


907-929: Simplified variable initialization in filterNodes

The logic for initializing clientLamportAtChange has been simplified to set a default value for local edits, maintaining functionality while removing legacy code.


930-935: Updated canDelete method call

The call to canDelete has been updated to match its new signature, removing the maxCreatedAt parameter in line with the cleanup goals of this PR.

packages/sdk/src/document/crdt/tree.ts (14)

637-640: Simplified existence check in canDelete

The node existence check has been simplified to rely solely on comparing the node's lamport timestamp with clientLamportAtChange, removing the dependency on maxCreatedAt which was maintained for backward compatibility.


653-657: Simplified existence check in canStyle

Similar to the change in canDelete, the node existence logic in canStyle has been streamlined to directly compare timestamps without relying on the legacy maxCreatedAt parameter.


882-887: Updated style method signature

The style method signature has been updated to remove the maxCreatedAtMapByActor parameter, simplifying the interface while maintaining all necessary functionality after the migration to Version Vectors.


906-912: Simplified variable initialization in style

The logic for initializing clientLamportAtChange has been simplified to set a default value for local edits, maintaining functionality while removing legacy code.


913-947: Updated canStyle method call

The call to canStyle has been updated to match its new signature, removing the maxCreatedAt parameter to align with the cleanup goals of this PR.


951-952: Updated return statement in style

The return statement now correctly matches the updated method signature, returning only the essential elements without the now-redundant maxCreatedAtMapByActor.


957-962: Updated removeStyle method signature

The removeStyle method signature has been updated to remove the maxCreatedAtMapByActor parameter, streamlining the interface following the Version Vector migration.


978-983: Simplified variable initialization in removeStyle

Similar to other methods, the logic for initializing clientLamportAtChange has been simplified to set a default value for local edits while removing legacy code.


985-988: Updated canStyle method call in removeStyle

The call to canStyle has been updated to match its new signature, correctly removing the maxCreatedAt parameter.


1016-1017: Updated return statement in removeStyle

The return statement now correctly matches the updated method signature, providing a cleaner interface that aligns with the PR objectives.


1023-1030: Updated edit method signature

The edit method signature has been updated to remove the maxCreatedAtMapByActor parameter, streamlining the interface as part of the broader cleanup effort.


1067-1073: Simplified variable initialization in edit

The logic for initializing clientLamportAtChange in the edit method has been simplified, maintaining functionality while removing legacy code patterns.


1074-1079: Updated canDelete method call in edit

The call to canDelete has been updated to match its new signature, correctly removing the maxCreatedAt parameter in line with the cleanup goals.


1183-1184: Updated return statement in edit

The return statement now correctly matches the updated method signature, removing the maxCreatedAtMapByActor component which is no longer needed.

✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai plan to trigger planning for file edits and PR creation.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

codecov bot commented Apr 2, 2025

Codecov Report

Attention: Patch coverage is 97.61905% with 1 line in your changes missing coverage. Please review.

Project coverage is 78.38%. Comparing base (2799b8b) to head (0a94654).

Files with missing lines Patch % Lines
packages/sdk/src/document/json/tree.ts 83.33% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #969      +/-   ##
==========================================
- Coverage   78.43%   78.38%   -0.05%     
==========================================
  Files          63       63              
  Lines        5435     5354      -81     
  Branches     1001      975      -26     
==========================================
- Hits         4263     4197      -66     
+ Misses        881      875       -6     
+ Partials      291      282       -9     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@hackerwins hackerwins requested a review from Copilot April 2, 2025 10:50
Copy link

@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.

Pull Request Overview

This PR removes legacy fields and functionality related to timestamp tracking (e.g., maxCreatedAtMapByActor and minSyncedTicket) that were used during the transition from Lamport timestamps to version vectors. The changes streamline method signatures and update protobuf definitions in multiple modules.

  • Legacy fields and parameters in tree and text operations have been removed.
  • Protobuf resources and API converters are updated to mark deprecated fields.
  • CRDT and RGA tree splitting logic is simplified to rely solely on version vectors.

Reviewed Changes

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

Show a summary per file
File Description
packages/sdk/src/document/operation/*.ts Removed legacy maxCreatedAtMapByActor parameter and related assignments in tree, style, edit, and tree edit operations.
packages/sdk/src/document/json/*.ts Updated JSON serialization to no longer pass legacy creation maps.
packages/sdk/src/document/crdt/*.ts Removed legacy comparisons based on maxCreatedAtMapByActor in favor of using only version vectors.
packages/sdk/src/document/change/*.ts Cleaned up unused minSyncedTicket field and related methods.
packages/sdk/src/api/yorkie/v1/* Marked deprecated fields in protobuf and updated API converters accordingly.
packages/sdk/src/api/converter.ts Updated conversion logic to remove references to legacy createdAt map fields.
Comments suppressed due to low confidence (2)

packages/sdk/src/document/crdt/tree.ts:951

  • Ensure that the removal of the legacy maxCreatedAtMapByActor does not affect the correctness of deletion and styling logic by adding tests that verify behavior with version vector comparisons.
return [pairs, changes];

packages/sdk/src/api/converter.ts:396

  • Verify that the removal of legacy createdAtMapByActor conversion logic does not impact client deserialization by ensuring there is adequate test coverage for protobuf serialization/deserialization.
for (const [key, value] of editOperation.getMaxCreatedAtMapByActor()) {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant