Addressed review comments and update go bindings version.

This commit is contained in:
Balachandar Namasivayam 2020-05-28 12:21:28 -07:00
parent a167bf344e
commit 7bcabbe4be
4 changed files with 12 additions and 8 deletions

View File

@ -32,7 +32,7 @@ import (
func ExampleOpenDefault() { func ExampleOpenDefault() {
var e error var e error
e = fdb.APIVersion(630) e = fdb.APIVersion(700)
if e != nil { if e != nil {
fmt.Printf("Unable to set API version: %v\n", e) fmt.Printf("Unable to set API version: %v\n", e)
return return
@ -52,7 +52,7 @@ func ExampleOpenDefault() {
} }
func TestVersionstamp(t *testing.T) { func TestVersionstamp(t *testing.T) {
fdb.MustAPIVersion(630) fdb.MustAPIVersion(700)
db := fdb.MustOpenDefault() db := fdb.MustOpenDefault()
setVs := func(t fdb.Transactor, key fdb.Key) (fdb.FutureKey, error) { setVs := func(t fdb.Transactor, key fdb.Key) (fdb.FutureKey, error) {
@ -98,7 +98,7 @@ func TestVersionstamp(t *testing.T) {
} }
func ExampleTransactor() { func ExampleTransactor() {
fdb.MustAPIVersion(630) fdb.MustAPIVersion(700)
db := fdb.MustOpenDefault() db := fdb.MustOpenDefault()
setOne := func(t fdb.Transactor, key fdb.Key, value []byte) error { setOne := func(t fdb.Transactor, key fdb.Key, value []byte) error {
@ -149,7 +149,7 @@ func ExampleTransactor() {
} }
func ExampleReadTransactor() { func ExampleReadTransactor() {
fdb.MustAPIVersion(630) fdb.MustAPIVersion(700)
db := fdb.MustOpenDefault() db := fdb.MustOpenDefault()
getOne := func(rt fdb.ReadTransactor, key fdb.Key) ([]byte, error) { getOne := func(rt fdb.ReadTransactor, key fdb.Key) ([]byte, error) {
@ -202,7 +202,7 @@ func ExampleReadTransactor() {
} }
func ExamplePrefixRange() { func ExamplePrefixRange() {
fdb.MustAPIVersion(630) fdb.MustAPIVersion(700)
db := fdb.MustOpenDefault() db := fdb.MustOpenDefault()
tr, e := db.CreateTransaction() tr, e := db.CreateTransaction()
@ -241,7 +241,7 @@ func ExamplePrefixRange() {
} }
func ExampleRangeIterator() { func ExampleRangeIterator() {
fdb.MustAPIVersion(630) fdb.MustAPIVersion(700)
db := fdb.MustOpenDefault() db := fdb.MustOpenDefault()
tr, e := db.CreateTransaction() tr, e := db.CreateTransaction()

View File

@ -14,6 +14,10 @@ For more details about API versions, see :ref:`api-versions`.
API version 700 API version 700
=============== ===============
API version 630
===============
General General
------- -------

View File

@ -67,7 +67,7 @@ Status
Bindings Bindings
-------- --------
* API version updated to 700. See the :ref:`API version upgrade guide <api-version-upgrade-guide-700>` for upgrade details. * API version updated to 630. See the :ref:`API version upgrade guide <api-version-upgrade-guide-630>` for upgrade details.
* Python: The ``@fdb.transactional`` decorator will now throw an error if the decorated function returns a generator. `(PR #1724) <https://github.com/apple/foundationdb/pull/1724>`_ * Python: The ``@fdb.transactional`` decorator will now throw an error if the decorated function returns a generator. `(PR #1724) <https://github.com/apple/foundationdb/pull/1724>`_
* Java: Add caching for various JNI objects to improve performance. `(PR #2809) <https://github.com/apple/foundationdb/pull/2809>`_ * Java: Add caching for various JNI objects to improve performance. `(PR #2809) <https://github.com/apple/foundationdb/pull/2809>`_
* Java: Optimize byte array comparisons in ``ByteArrayUtil``. `(PR #2823) <https://github.com/apple/foundationdb/pull/2823>`_ * Java: Optimize byte array comparisons in ``ByteArrayUtil``. `(PR #2823) <https://github.com/apple/foundationdb/pull/2823>`_

View File

@ -321,7 +321,7 @@ void DLApi::init() {
loadClientFunction(&api->transactionReset, lib, fdbCPath, "fdb_transaction_reset"); loadClientFunction(&api->transactionReset, lib, fdbCPath, "fdb_transaction_reset");
loadClientFunction(&api->transactionCancel, lib, fdbCPath, "fdb_transaction_cancel"); loadClientFunction(&api->transactionCancel, lib, fdbCPath, "fdb_transaction_cancel");
loadClientFunction(&api->transactionAddConflictRange, lib, fdbCPath, "fdb_transaction_add_conflict_range"); loadClientFunction(&api->transactionAddConflictRange, lib, fdbCPath, "fdb_transaction_add_conflict_range");
loadClientFunction(&api->transactionGetEstimatedRangeSizeBytes, lib, fdbCPath, "fdb_transaction_get_estimated_range_size_bytes", headerVersion >= 700); loadClientFunction(&api->transactionGetEstimatedRangeSizeBytes, lib, fdbCPath, "fdb_transaction_get_estimated_range_size_bytes", headerVersion >= 630);
loadClientFunction(&api->futureGetInt64, lib, fdbCPath, headerVersion >= 620 ? "fdb_future_get_int64" : "fdb_future_get_version"); loadClientFunction(&api->futureGetInt64, lib, fdbCPath, headerVersion >= 620 ? "fdb_future_get_int64" : "fdb_future_get_version");
loadClientFunction(&api->futureGetError, lib, fdbCPath, "fdb_future_get_error"); loadClientFunction(&api->futureGetError, lib, fdbCPath, "fdb_future_get_error");