Commit Graph

242 Commits

Author SHA1 Message Date
Dave Cottlehuber 673d186ce2 bindings: update go 2020-04-30 18:11:23 +00:00
A.J. Beamon 35bc03a924
Merge pull request #3032 from vishesh/pr-2421
go: Update Stringer interface on Tuple and Subspace
2020-04-30 08:13:07 -07:00
Vishesh Yadav ebf7adfa00 Revert "Merge pull request #1910 from ryanworl/ryanworl/remove-finalizers"
This reverts commit cef556bbee, reversing
changes made to a6fe8c1d1f.
2020-04-29 00:44:33 -07:00
Vishesh Yadav 5b1d99bc3b go: Implement fmt.Stringer for Versionstamp 2020-04-28 17:18:44 -07:00
Vishesh Yadav 8c9a646744 go: Don't complain about unsafe pointer conversion in stringRefToSlice
Running Go bindings with `-race` argument will enable instrumentation to check
pointer conversions, and complain about potential unsafe conversion in
`stringRefToSlice`.

This patch adds annotation `go:nocheckptr` annotation to skip that check, since
our conversion is safe, and can let users take advantage of check for their code
without this false positive.

It will be useful to check if, we can potentially rewrite this code to obey Go
pointer conversion rules.

FIXES #2843

Signed-off-by: Vishesh Yadav <vishesh_yadav@apple.com>
2020-04-26 22:06:57 -07:00
Vishesh Yadav ecb1d9b8c6 go: Subspace doesn't have to inherit fmt.Stringer
Go does duck-typing, so any `struct` can choose to implement String()
and it will automatically be Stringer(). There is no need to enforce in
out interface.
2020-04-26 20:44:23 -07:00
Vishesh Yadav 22fa93264f go: Implment Stringer interface for DirectorySubspace 2020-04-26 20:31:49 -07:00
Vishesh Yadav e592901551 go: Rename Subspace member `b` to `rawPrefix`
Naming stays consistent with other Python/Java.
2020-04-26 19:28:47 -07:00
Vishesh Yadav 642840a3f4 go: Update tuple/subspace String() to output readable strings 2020-04-26 19:26:33 -07:00
Pieter Joost 2a61823106 iimplement fmt.Stringer interface on Subspace 2020-04-26 19:26:33 -07:00
Pieter Joost 16f3a2480b implement fmt.Stringer interface on Tuple 2020-04-26 19:26:33 -07:00
Evan Tschannen c87aa33941 Merge branch 'release-6.2'
# Conflicts:
#	CMakeLists.txt
#	bindings/go/src/fdb/generated.go
#	documentation/sphinx/source/api-common.rst.inc
#	documentation/sphinx/source/api-ruby.rst
#	documentation/sphinx/source/release-notes.rst
#	fdbclient/FailureMonitorClient.actor.cpp
#	fdbclient/NativeAPI.actor.cpp
#	fdbclient/vexillographer/fdb.options
#	fdbrpc/FlowTransport.actor.cpp
#	fdbserver/OldTLogServer_6_0.actor.cpp
#	fdbserver/TLogServer.actor.cpp
#	fdbserver/fdbserver.actor.cpp
#	versions.target
2020-04-23 13:47:53 -07:00
Evan Tschannen 1c04aa5f0c
Merge pull request #2958 from AlvinMooreSr/go-getter
Get Go Dependencies Before Installing
2020-04-22 10:38:02 -07:00
Vishesh Yadav 841af731c5
go: Rename deprecated fdb_future_get_version to fdb_future_get_int64 2020-04-16 09:58:50 -07:00
Vishesh Yadav b6b9f13016
Merge branch 'master' into ryanworl/remove-finalizers 2020-04-16 01:01:00 -07:00
Alvin Moore d555fbb853 Changed the get to only get the dependencies 2020-04-15 09:07:12 -07:00
Alvin Moore ed8e5bc64f Added support for getting go dependencies before install source 2020-04-15 08:46:37 -07:00
Markus Pilman d4542dbb5a Delete old build system 2020-04-07 11:03:45 -07:00
A.J. Beamon c11b9d0721 Including port in addresses option is deprecated in 630 rather than 700. Includes other latent generated go changes to the documentation. 2020-04-07 08:51:15 -07:00
Balachandar Namasivayam 6d570cd865 Change version from 7.0 to 6.3 2020-04-03 21:38:58 -07:00
Jingyu Zhou ae480c14a3 Add documentation of get_approximate_size for Python, Ruby, and Go
This was missed from original PR #1756, where only C API was documented.
2020-03-31 13:42:02 -07:00
Xin Dong 353fcb2096 Update Go binding documentations for the new API to be consistent with others 2020-03-25 10:02:38 -07:00
Xin Dong 338c62b176 Moved up the new test cases to comply the convention there. 2020-03-24 09:53:52 -07:00
Xin Dong 527686ffe0 Added a test in API tests for the new API(getEstimagedRangeSize). 2020-03-24 09:26:56 -07:00
Evan Tschannen 96258b9809 Merge branch 'release-6.2'
# Conflicts:
#	documentation/sphinx/source/release-notes.rst
#	fdbcli/fdbcli.actor.cpp
#	fdbclient/ManagementAPI.actor.cpp
#	fdbrpc/FlowTransport.actor.cpp
#	fdbserver/ClusterController.actor.cpp
#	fdbserver/DataDistribution.actor.cpp
#	fdbserver/DataDistribution.actor.h
#	fdbserver/DataDistributionQueue.actor.cpp
#	fdbserver/KeyValueStoreMemory.actor.cpp
#	fdbserver/MasterProxyServer.actor.cpp
#	fdbserver/QuietDatabase.actor.cpp
#	fdbserver/SkipList.cpp
#	fdbserver/StorageMetrics.actor.h
#	fdbserver/TLogServer.actor.cpp
#	fdbserver/fdbserver.actor.cpp
#	fdbserver/storageserver.actor.cpp
#	fdbserver/workloads/KVStoreTest.actor.cpp
#	flow/CMakeLists.txt
#	flow/Knobs.cpp
#	flow/Knobs.h
#	flow/genericactors.actor.cpp
#	flow/serialize.h
2020-02-21 19:09:16 -08:00
A.J. Beamon d1f050690a
Merge pull request #2454 from ajbeamon/document-range-read-efficiency
Document efficiency of reverse range reads
2020-02-20 15:25:38 -08:00
A.J. Beamon 649fc6ba94
Merge pull request #2329 from davisp/trace-clock-source-network-option
Add network option for the trace clock source
2020-02-15 10:43:00 -08:00
Paul J. Davis 32e285a761 Add network option for the trace clock source
This option allows clients to select the clock source for trace events
similar to the `--traceclock` command line parameter for `fdbserver`.
Using the `realtime` clock sources makes loading event data into
OpenTracing systems like Jaeger more useful.
2020-02-15 11:30:43 -06:00
A.J. Beamon d8e8d13269
Merge pull request #2620 from sevki/mac-linking
bindings/go: explicit CFLAGS and LDFLAGS for macOS and windows
2020-02-14 14:04:10 -08:00
Xin Dong f43a5d614a Removed unnecessary codes in Java bindings. Cleaned up Go bindings a bit. 2020-02-12 14:57:40 -08:00
Xin Dong 6534539733 Fix the Go bindings build failure. 2020-02-12 14:57:40 -08:00
Xin Dong 2e1d03cbe7 Addressed AJ's review comments 2020-02-12 14:57:40 -08:00
Xin Dong bd19dd278e Apply suggestions from code review
Co-Authored-By: A.J. Beamon <ajbeamon@users.noreply.github.com>
2020-02-12 14:57:40 -08:00
Xin Dong d20ce99774 Resolved the review comment and renamed the functions 2020-02-12 14:57:40 -08:00
Xin Dong 5d30296db8 Alright this time fix the go build for real. 2020-02-12 14:57:40 -08:00
Xin Dong 3777b099ef Fix Go bindings build failure 2020-02-12 14:57:40 -08:00
Xin Dong 85c10d13a5 Exposed the byte sample function to the following bindings:
- Flow
- Java
- Go [ needs verify ]
- Python [ needs verify ]
- Ruby [ needs verify ]
2020-02-12 14:57:40 -08:00
A.J. Beamon 72f92626e4 Update API version to 700 2020-01-30 09:26:27 -08:00
sevki 53e388b993 bindings/go: explicit CFLAGS and LDFLAGS for windows
Added a windows specific version of this too.

Fixes:  #2299
2020-01-30 17:23:58 +00:00
sevki f35b586052 bindings/go: explicit CFLAGS and LDFLAGS for macOS
When applied these changes will tell the CGO toolchain on macOS
the default installation location for the headers and libs.

I've recently started playing around with FDB go bindings on my mac.
I've followed the tutorial to set everything up but whilst doing so
I've started getting some error messages like so:

     /Users/sevki/go/pkg/mod/github.com/apple/foundationdb/bindings/go@v0.0.0-20200125010749-6945a6ea0141/src/fdb/cluster.go:26:11: fatal error: 'foundationdb/fdb_c.h' file not found
      #include <foundationdb/fdb_c.h>
                ^~~~~~~~~~~~~~~~~~~~~~

These errors are most probably caused by me unsetting LDFLAGS, CFLAGS
globally as the installer installs the header files and the libraries
to sane default locations.

However, I believe explicitly telling the CGO toolchain here is a
better experience for using this library. While unsetting LDFLAGS
and CFLAGS is not a very smart thing to do, some IDEs and other build
tools make it very hard to pass environment variables to set in this
context.
2020-01-30 13:54:54 +00:00
Vishesh Yadav bfcdf6bc88
Merge pull request #2243 from canardleteer/go-pack-with-versionstamp
Add PackWithVersionstamp to Go Subpace & Directory bindings.
2020-01-27 08:34:20 -08:00
Alex Miller 8a44c5e08d
Merge pull request #2469 from vishesh/task/documentation
godoc: How to check for non-existing keys from Go bindings
2020-01-16 14:55:52 -08:00
Vishesh Yadav 069ca18df5
Update with review suggestion.
Co-Authored-By: Alex Miller <35046903+alexmiller-apple@users.noreply.github.com>
2020-01-08 18:12:40 -08:00
Vishesh Yadav 5c48a105c5 docs: Document CompareAndClear atomic op 2019-12-16 13:53:52 -08:00
Vishesh Yadav f30ded1fac godoc: How to check for non-existing keys from Go bindings 2019-12-16 11:25:18 -08:00
gauravvnera 83da581314 addressed review comments 2019-12-14 00:10:25 +05:30
gauravvnera b734afb50f Clarify Documentation for clear_range 2019-12-13 09:22:36 +05:30
gauravvnera 1dedd3df56 Clarify Documentation for clear_range 2019-12-13 09:18:57 +05:30
A.J. Beamon e23dfa83e1 Fix go formatting 2019-12-12 15:04:30 -08:00
A.J. Beamon 3cc3f1d2ad Note that range reads are supported natively by the database and have little cost over regular range reads. 2019-12-12 10:50:21 -08:00