Details
-
Bug
-
Resolution: Fixed
-
Major
-
1.0.0-alpha.2
-
None
-
1
-
SDK 44: Txns, SDK 3.1, Docs
Description
I've been running into the following fit performer failure, which I don't get to the bottom of on my own.
Test case is:
TransactionResult result2 = TransactionBuilder.create(shared)
|
.addHook(Hook.newBuilder()
|
.setHookPoint(HookPoint.BEFORE_GET_DOC_IN_EXISTS_DURING_STAGED_INSERT)
|
.setHookCondition(HookCondition.ON_CALL_LE)
|
.setHookConditionParam1(1)
|
.setHookAction(HookAction.FAIL_TRANSIENT)
|
.build())
|
.insert(collection,docId, initial,
|
EXPECT_FAIL_WRITE_WRITE_CONFLICT, EXPECT_SUCCESS, EXPECT_FAIL_TRANSIENT_AND_RETRY)
|
.sendToPerformer();
|
and it indeed fails in c#, but different than what the fit performer needs:
TestFailureException: createStagedInsertOnPendingTransaction Operation failed unexpectedly, was expecting [ { "error": { "toRaise": "EXCEPTION_FAILED", "cause": { "doNotCheck": true } } } ] but got { "errorClass": "EC_FAIL_OTHER", "toRaise": "EXCEPTION_FAILED", "cause": { "exception": "NotSet" } }: Exception of type 'Couchbase.Transactions.Error.Internal.TransactionOperationFailedException' was thrown.
|
---> Couchbase.Transactions.Error.Internal.TransactionOperationFailedException: Exception of type 'Couchbase.Transactions.Error.Internal.TransactionOperationFailedException' was thrown.
|
at Couchbase.Transactions.AttemptContext.<>c__DisplayClass41_0.<<CreateStagedInsert>b__0>d.MoveNext() in /Users/michaelnitschinger/couchbase/code/dotnet/couchbase-transactions-dotnet/src/Couchbase.Transactions/AttemptContext.cs:line 561
|
--- End of stack trace from previous location where exception was thrown ---
|
at Couchbase.Transactions.AttemptContext.RepeatUntilSuccessOrThrow[T](Func`1 func, Int32 retryLimit, String caller) in /Users/michaelnitschinger/couchbase/code/dotnet/couchbase-transactions-dotnet/src/Couchbase.Transactions/AttemptContext.cs:line 1488
|
at Couchbase.Transactions.AttemptContext.CreateStagedInsert(ICouchbaseCollection collection, String id, Object content, Nullable`1 cas) in /Users/michaelnitschinger/couchbase/code/dotnet/couchbase-transactions-dotnet/src/Couchbase.Transactions/AttemptContext.cs:line 442
|
at Couchbase.Transactions.AttemptContext.InsertAsync(ICouchbaseCollection collection, String id, Object content) in /Users/michaelnitschinger/couchbase/code/dotnet/couchbase-transactions-dotnet/src/Couchbase.Transactions/AttemptContext.cs:line 435
|
at Couchbase.Transactions.FitPerformer.TwoWayTransaction.<>c__DisplayClass4_1.<<PerformOperation>b__0>d.MoveNext() in /Users/michaelnitschinger/couchbase/code/dotnet/transactions-fit-performer/performers/dotnet/Couchbase.Transactions.FitPerformer/TwoWayTransaction.cs:line 87
|
--- End of stack trace from previous location where exception was thrown ---
|
at Couchbase.Transactions.FitPerformer.TwoWayTransaction.PerformOperation(String testName, String opDebug, AttemptContext ctx, Boolean doNotPropagateError, ICollection`1 expectedResults, Func`1 op) in /Users/michaelnitschinger/couchbase/code/dotnet/transactions-fit-performer/performers/dotnet/Couchbase.Transactions.FitPerformer/TwoWayTransaction.cs:line 318
|
and
[14:23:10 WRN] createStagedInsertOnPendingTransaction Operation failed unexpectedly, was expecting [{"Success": false, "AnythingAllowed": false, "Error": {"ErrorClass": "EcFailHard", "AutoRollbackAttempt": false, "RetryTransaction": false, "ToRaise": "ExceptionFailed", "Cause": {"DoNotCheck": true, "Exception": "Unknown", "CauseCase": "DoNotCheck", "$type": "ExpectedCause"}, "$type": "ErrorWrapper"}, "ResultCase": "Error", "$type": "ExpectedResult"}] but got {"ErrorClass": "EcFailOther", "AutoRollbackAttempt": false, "RetryTransaction": false, "ToRaise": "ExceptionFailed", "Cause": {"DoNotCheck": false, "Exception": "NotSet", "CauseCase": "Exception", "$type": "ExpectedCause"}, "$type": "ErrorWrapper"}: Exception of type 'Couchbase.Transactions.Error.Internal.TransactionOperationFailedException' was thrown.
|
|
I think it expected a EcFailHard but it got a EcFailOther.