Uploaded image for project: 'Couchbase Documentation'
  1. Couchbase Documentation
  2. DOC-8687

XDCR note for Atomic Counters?

    XMLWordPrintable

Details

    • DOC-2021-Aug01-S15, DOC-2021-Aug15-S16, DOC-2021-Sep26-S19, DOC-2021-Oct10-S20, DOC-2021-Oct24-S21, DOC-2021-Nov07-S22, DOC-2021-Nov21-S23, DOC-2021-Dec05-S24, DOC-2021-Dec19-S25, DOC-2021-Dec31-S26, DOC-2022-S1, DOC-2022-S2, DOC-2022-S3, DOC-2022-S4, DOC-2022-S5, DOC-2022-S6, DOC-2022-S7, DOC-2022-S8, DOC-2022-S9, DOC-2022-S10, DOC-2022-S11, DOC-2022-S12, DOC-2022-S13, DOC-2022-S14

    Description

      This 3.1 docs page could benefit from a note about XDCR, similar to the one here: https://docs.couchbase.com/dotnet-sdk/2.7/core-operations.html#devguide_kvcore_counter_generic

      See the discussion here: https://forums.couchbase.com/t/atomic-counter-xdcr-support/30819

      Reporter: Matthew Groves
      E-mail: matthew.groves@couchbase.com

      Attachments

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

        Activity

          david.nault David Nault added a comment - - edited

          I think it might be overkill to say "Do not increment or decrement counters if using XDCR."

          You can still increment and decrement counters if you're using XDCR. The thing to avoid is modifying the same counter in multiple datacenters, since the counter will no longer be atomic, and its value can change in unspecified ways.

          I think perhaps the message should be that a counter must be incremented/decremented by only a single datacenter. Each datacenter must have its own set of counters that it uses (by, forexample, including a datacenter name in the counter document ID).

           

          david.nault David Nault added a comment - - edited I think it might be overkill to say "Do not increment or decrement counters if using XDCR." You can still increment and decrement counters if you're using XDCR. The thing to avoid is modifying the same counter in multiple datacenters, since the counter will no longer be atomic, and its value can change in unspecified ways. I think perhaps the message should be that a counter must be incremented/decremented by only a single datacenter. Each datacenter must have its own set of counters that it uses (by, forexample, including a datacenter name in the counter document ID).  
          david.nault David Nault added a comment -

          Does this need to be carried forward, or should it be placed in the backlog?

          david.nault David Nault added a comment - Does this need to be carried forward, or should it be placed in the backlog?

          Thanks David Nault 

          It's something we should be documenting - let's leave it in the sprint for now, until work on prioritising improvements is complete.

          richard.smedley Richard Smedley added a comment - Thanks David Nault   It's something we should be documenting - let's leave it in the sprint for now, until work on prioritising improvements is complete.
          richard.smedley Richard Smedley added a comment - https://docs-staging.couchbase.com/dotnet-sdk/current/howtos/kv-operations.html#atomicity-across-data-centers  

          Added to all SDKs - will be in tonight's docs build.

          richard.smedley Richard Smedley added a comment - Added to all SDKs - will be in tonight's docs build.

          People

            richard.smedley Richard Smedley
            matthew.groves Matthew Groves
            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