Metadata xattrs stays in metadata forever when app stops

in debug mode, while code is in transaction context if I stop the application, xattrs data left in metadata forever. After I rerun my application, data comes from metadata(not committed old data), how can I solve this, and do you think I would see this problem in runtime too?

Thank you.

Would you mind posting the code you are using? In the scenario you described, the “staging” data should hang around, but eventually be cleaned up by a background process.

Hi Matthew, I can’t share the code but basically, it’s like this:

async context => {
  await context.replaceAsync(getResult, data);
  await context.replaceAsync(getResult2, data2);

  await context.commitAsync();

but when I stop the application before commitAsync line in debug mode, “staging” data hanging forever. I am tracking the data in cb interface but staging data stays still in metadata. Debug mode is not my priority, I am just worried if something like this could happen in production.

Which version of Couchbase Server, which version of the SDK, and which version of the transaction library?

Couchbase Server: Enterprise Edition 6.6.0
CouchbaseNetClient: 3.1.3
Couchbase.Transactions: 1.0.0-beta.2

@Richard_Ponton should be able to help here.

Hi @mehmet.firat.komurcu ,

There is a background cleanup thread running in the Transactions object that will clean up this metadata the next time any Transactions client is run.

1 Like

Okey Richard, thank you for information. :+1: