yorkie-team / yorkie

Yorkie is a document store for collaborative applications.
https://yorkie.dev
Apache License 2.0
761 stars 140 forks source link

Implement RHT.GC #864

Closed hackerwins closed 3 months ago

hackerwins commented 3 months ago

What this PR does / why we need it:

Implement RHT.GC

This commit adds GC to RHT data structure. RHT is used in Tree and Text, and when Style methods are executed, values that need to be GC'ed are added to the GC cache. This commit generalizes GC logic by introducing abstract types GCParent and GCChild and managing them flatly from the root.

Which issue(s) this PR fixes:

Address #796

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

Additional documentation:

Checklist:

codecov[bot] commented 3 months ago

Codecov Report

Attention: Patch coverage is 45.38462% with 71 lines in your changes are missing coverage. Please review.

Project coverage is 50.64%. Comparing base (18224f1) to head (ccacc0a).

:exclamation: Current head ccacc0a differs from pull request most recent head 1e5ca67

Please upload reports for the commit 1e5ca67 to get more accurate results.

Files Patch % Lines
pkg/document/crdt/tree.go 36.06% 37 Missing and 2 partials :warning:
pkg/document/crdt/rht.go 66.66% 16 Missing and 1 partial :warning:
pkg/document/crdt/root.go 18.75% 12 Missing and 1 partial :warning:
pkg/document/change/context.go 0.00% 2 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #864 +/- ## ========================================== - Coverage 50.81% 50.64% -0.17% ========================================== Files 70 70 Lines 10285 10342 +57 ========================================== + Hits 5226 5238 +12 - Misses 4530 4573 +43 - Partials 529 531 +2 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.