mirror of
https://github.com/apple/foundationdb.git
synced 2025-06-01 02:37:02 +08:00
Fix review comments: release notes and formatting
This commit is contained in:
parent
4b36099097
commit
7c0aca5b0c
@ -26,7 +26,7 @@ Status
|
||||
Bindings
|
||||
--------
|
||||
|
||||
* C: Added ``fdb_transaction_get_approximate_size`` to get the approximated transaction size before commit. `(PR #1756) <https://github.com/apple/foundationdb/pull/1756>`_.
|
||||
* Added a new API to get the approximated transaction size before commit, e.g., ``fdb_transaction_get_approximate_size`` in the C binding. `(PR #1756) <https://github.com/apple/foundationdb/pull/1756>`_.
|
||||
* C: ``fdb_future_get_version`` has been renamed to ``fdb_future_get_int64``. `(PR #1756) <https://github.com/apple/foundationdb/pull/1756>`_.
|
||||
* Go: The Go bindings now require Go version 1.11 or later.
|
||||
* Go: Fix issue with finalizers running too early that could lead to undefined behavior. `(PR #1451) <https://github.com/apple/foundationdb/pull/1451>`_.
|
||||
|
@ -1448,10 +1448,10 @@ void ReadYourWritesTransaction::writeRangeToNativeTransaction(KeyRangeRef const&
|
||||
switch(op[i].type) {
|
||||
case MutationRef::SetValue:
|
||||
if (op[i].value.present()) {
|
||||
tr.set(it.beginKey().assertRef(), op[i].value.get(), false);
|
||||
} else {
|
||||
tr.clear(it.beginKey().assertRef(), false);
|
||||
}
|
||||
tr.set(it.beginKey().assertRef(), op[i].value.get(), false);
|
||||
} else {
|
||||
tr.clear(it.beginKey().assertRef(), false);
|
||||
}
|
||||
break;
|
||||
case MutationRef::AddValue:
|
||||
case MutationRef::AppendIfFits:
|
||||
@ -1467,8 +1467,8 @@ void ReadYourWritesTransaction::writeRangeToNativeTransaction(KeyRangeRef const&
|
||||
case MutationRef::MinV2:
|
||||
case MutationRef::AndV2:
|
||||
case MutationRef::CompareAndClear:
|
||||
tr.atomicOp(it.beginKey().assertRef(), op[i].value.get(), op[i].type, false);
|
||||
break;
|
||||
tr.atomicOp(it.beginKey().assertRef(), op[i].value.get(), op[i].type, false);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@ -1582,8 +1582,9 @@ void ReadYourWritesTransaction::atomicOp( const KeyRef& key, const ValueRef& ope
|
||||
throw client_invalid_operation();
|
||||
}
|
||||
|
||||
approximateSize += k.expectedSize() + v.expectedSize() + sizeof(MutationRef);
|
||||
if(options.readYourWritesDisabled) {
|
||||
approximateSize += k.expectedSize() + v.expectedSize() + sizeof(MutationRef) +
|
||||
(addWriteConflict ? sizeof(KeyRangeRef) + 2 * key.expectedSize() + 1 : 0);
|
||||
if (options.readYourWritesDisabled) {
|
||||
return tr.atomicOp(k, v, (MutationRef::Type) operationType, addWriteConflict);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user