Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-21125

Prevent duplicate keys in dump

Agile BoardAttach filesAttach ScreenshotAdd voteVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Task
    • Status: Patch Available
    • Major
    • Resolution: Unresolved
    • None
    • 2.17
    • None
    • Docs Required, Release Notes Required

    Description

      Currently, cache dump can contain the same key several times.
      In the read time we must maintain Set of read keys to filter out duplicates.
      So dump read leads to high GC pressure.

      We can overcome this issue and filter out duplicates in the write time:

      • Iterator don't write keys that was written by beforeChange listener, already.
      • Partition Iterator returns key in ascending order. Order set by CacheDataTree#compare method.
      • beforeChange listener must not write keys that was already written by the iterator.

      Cheap algorithm is the following:

      • Store last key written by iterator.
      • If changed key (in beforeChange) less then last key written by iterator then it must be skiped. Because, it already saved by the iterator.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            nizhikov Nikolay Izhikov
            nizhikov Nikolay Izhikov

            Dates

              Created:
              Updated:

              Time Tracking

              Estimated:
              Original Estimate - Not Specified
              Not Specified
              Remaining:
              Remaining Estimate - 0h
              0h
              Logged:
              Time Spent - 1.5h
              1.5h

              Slack

                Issue deployment