Uploaded image for project: 'Couchbase Gateway'
  1. Couchbase Gateway
  2. CBG-247

Reduce CPU associated with large skipped sequence queue

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.1.2
    • Fix Version/s: 2.5.0, 2.1.3
    • Component/s: SyncGateway
    • Security Level: Public
    • Labels:
      None
    • Sprint:
      CBG Sprint 13
    • Story Points:
      5

      Description

      When the skipped sequence queue grows very large, the cost associated with removal from that queue becomes a performance bottleneck.  SkippedSequenceQueue.Remove does a sort.Search in the slice to find the value, then does a slice shift/copy to remove the element.  For large skipped sequence queues, the memory move associated with that shift becomes a performance bottleneck.

      The current slice-based queue should be replaced with a list+map - the map for direct access to elements by sequence, and the list for memory efficient removal from an ordered list.

       

        Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

          Hide
          build-team Couchbase Build Team added a comment -

          Build sync_gateway-2.5.0-227 contains sync_gateway commit fdc44da with commit message:
          CBG-247 Switch skipped sequence collection from slice to map+list (#3978)

          Show
          build-team Couchbase Build Team added a comment - Build sync_gateway-2.5.0-227 contains sync_gateway commit fdc44da with commit message: CBG-247 Switch skipped sequence collection from slice to map+list (#3978)
          Hide
          build-team Couchbase Build Team added a comment -

          Build sync_gateway-2.1.2.1-4 contains sync_gateway commit f7783ee with commit message:
          Backport CBG-247 to 2.1.2.1 (#3981)

          Show
          build-team Couchbase Build Team added a comment - Build sync_gateway-2.1.2.1-4 contains sync_gateway commit f7783ee with commit message: Backport CBG-247 to 2.1.2.1 (#3981)
          Hide
          daniel.petersen Daniel Petersen added a comment -

          had to reopen to remove releasenote label

          Show
          daniel.petersen Daniel Petersen added a comment - had to reopen to remove releasenote label

            People

            • Assignee:
              adamf Adam Fraser
              Reporter:
              adamf Adam Fraser
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Gerrit Reviews

                There are no open Gerrit changes

                  PagerDuty

                  Error rendering 'com.pagerduty.jira-server-plugin:PagerDuty'. Please contact your Jira administrators.