SDK 3.2 with 6.6 Server Durability Options

Hi,

My previous setup was as follows:

  • Couchbase Server 5.5
  • SDK 2.7
  • PersistTo and ReplicateTo not explicitly set/used (I assume this is equal to PersistTo and ReplicateTo = 0?)

With the above, the following gave me the expected result:

  • Insert New Document
  • Read Document Inserted Above ==> Exists and completes successfully

The above doesn’t work as expected under the new setup:

  • Couchbase Server 6.6
  • SDK 3.2
  • Durability config not explicitly set/used (I assume this is equal to Durability = None?)

The results with the above are:

  • Insert New Document
  • Read Document Inserted Above ==> Does Not Exist and causes error
  • Re-try Read Doment Inserted Above ==> Exists and completes successfully

Given the above and the documentation on Durable Writes, it seems this is related to a timing difference and/or maybe a durability change between the 2 setups. NOTE: I did not try putting a delay after the Insert, but it’s possible if that were there, it would succeed.

If I wanted functional parity between the old and new setups, should the Durable configuration be set and what value should it be set to for the SDK 3.2 operation? I know Durability options can be set on the Server, but we are aiming to properly execute the SDK 3.2 operations without knowing about/regardless of the Server setup.

From what I read, it seems Durable=Majority may be the correct config? Is this correct, or am I missing something else that would cause the difference in behaviour?

@obawin

The scenario you’re describing should be working, can you provide some example code that reproduces the problem?

hi @btburnett3 ,

Apologizes; looks like a coding error on my part when migrating from SDK2 to SDK3.

Works well + as a bonus, we enhanced things by added configuration to allow for durable writes if clients/workflows deem it necessary.

Thanks!

1 Like