Giter Club home page Giter Club logo

couchbase-transactions-dotnet's Introduction

Deprecated!

Note: This repo is deprecated. Couchbase.Transactions has been merged into the main Couchbase dotnet repo at https://github.com/couchbase/couchbase-net-client

Couchbase Transactions for .NET

This is the official Distributed Transactions SDK for Couchbase in .NET.

Pull Requests and Submissions

Being an Open Source project, the Couchbase SDK depends upon feedback and submissions from the community. If you feel as if you want to submit a bug fix or a feature, please post a Pull Request. The Pull Request will go through a formal code review process and merged after being +2'd by a Couchbase Engineer. In order to accept a submission, Couchbase requires that all contributors sign the Contributor License Agreement (CLA). You can do this by creating an account in Gerrit, our official Code Review system. After you have created your account, login and check the CLA checkbox.

Once the CLA is signed, a Couchbase engineer will push the pull request to Gerrit and one or more Couchbase engineers will review the submission. If it looks good they will then +2 the changeset and merge it with master. In addition, if the submission needs more work, you will need to amend the Changeset with another Patchset. Note that is strongly encouraged to submit a Unit Test with each submission and also include a description of the submission, what changed and what the result is.

couchbase-transactions-dotnet's People

Contributors

ripont avatar mikegoldsmith avatar jeffrymorris avatar brett19 avatar ingenthr avatar daschl avatar

Stargazers

Malcolm Learner avatar

Watchers

Steve Yen avatar Sarath Lakshman avatar  avatar Graham Pople avatar  avatar  avatar Wayne Siu avatar  avatar  avatar Dan Owen avatar Arunkumar Senthilnathan avatar Dave Finlay avatar  avatar Ashwin avatar Adam Fraser avatar  avatar  avatar Keshav Murthy avatar  avatar Hans Wong avatar

Forkers

malclear ripont

couchbase-transactions-dotnet's Issues

Published binary does not match any tag in the repository

The binary in the Nuget package labeled as v1.0.0 does not match the latest commit in Master, nor is there any label indicating which code commit was the most recent at the time the binary was built. This makes debugging the code harder.

I'm getting an error message indicating a problem in the "GetWithMavAsync" function, but that function has since been renamed. What else has changed?

Batch insert using transactions

Hi everyone,

I'm facing an issue while inserting simultaneously multiple documents in couchbase, using transactions.
What I have read on the couchbase documentation (batching paragraph) is to instantiate a Task for each insertion and wait for the completion of all of them (as documented here)

If I try to execute many inserts in a batch (by instantiating multiple tasks) without using transactions everythings works fine, but when I call the InsertAsync method from the AttemptContext object, an exeception will randomly be thrown.
Here I've created a repository where you can reproduce the error.

You can find the stack trace listed below:

Couchbase.Transactions.Error.TransactionFailedException: Transaction failed.
---> System.InvalidOperationException: Collection was modified; enumeration operation may not execute.
at System.Collections.Generic.List`1.Enumerator.MoveNextRare()
at System.Linq.Enumerable.Any[TSource](IEnumerable`1 source, Func`2 predicate)
at Couchbase.Transactions.AttemptContext.InsertAsync(ICouchbaseCollection collection, String id, Object content)
at TransactionBulkInsert.Program.<>c__DisplayClass7_1.<b__0>d.MoveNext() in C:\Users\user\source\repos\TransactionBulkInsert\Program.cs:line 73
--- End of stack trace from previous location where exception was thrown ---
at Couchbase.Transactions.Transactions.ExecuteApplicationLambda(Func`2 transactionLogic, TransactionContext overallContext, ILoggerFactory loggerFactory, TransactionResult result)
--- End of inner exception stack trace ---
at Couchbase.Transactions.Transactions.RunAsync(Func`2 transactionLogic, PerTransactionConfig perConfig)
at TransactionBulkInsert.Program.SaveBatch() in C:\Users\user\source\repos\TransactionBulkInsert\Program.cs:line 64
-----------------------Context Info---------------------------
null

Examining the source code I suppose is something related to _stagedMutations property of AttempContext class. In particular seems that the exception was thrown at line 424 when searching for staged mutations while another task may have changed the same collection.

Currently I'm using these nuget packages:

  • CouchbaseNetClient: v3.1.7
  • Couchbase.Transactions: v1.0.0

and Couchbase Server Community v.6.6.0

Do you have any suggestion?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.