2116 Commits

Author SHA1 Message Date
Sepeth
39172d7dc4
Remove Python 2.7 support and six.py (#11418) 2024-10-02 21:12:51 -07:00
pnewell
9b8594c9b3
Explicitly type 1e3 as int (#11695)
* Explicitly type 1e3 as int

Fixes issue causing binding tester to throw error ('float' object cannot be interpreted as an integer) when using certain Python versions (encountered with 3.12.6).

* Explicitly type 1e8 as int

Additional occurrence throwing intermittent errors.
2024-10-01 12:02:04 -07:00
Jingyu Zhou
a315ff1840 Remove ctest from prev3 version
Only test as early as previous 2 versions.
2024-09-18 16:09:36 -07:00
Sepeth
3854dbfe4d
Upgrade fmt from 8.1.1 to 11.0.2 (#11601)
And, added via cmake FetchContent, and removed contrib/fmt-8.1.1
2024-09-10 14:42:43 -07:00
Giuseppe
e55f039788
Go binding: fix bug with R/O transaction destroyed before futures, add GC references for db/tx (#11611)
* Go binding: fix bug with R/O transaction destroyed before futures, add GC references for db/tx

In a previous PR the R/O transaction was optimized and the finalizer was removed; however this prevents using
any future, since transaction is already destroyed by the time future is attempted evaluation.

Additionally, a new issue is uncovered and addressed: the Go Database, Transaction and Future objects are all
garbage-collected independently, which is incorrect because Database and Transaction must not be garbage-collected
if any future has not yet been garbage-collected.

* Go binding: add test for future evaluated outside of R/O transaction
2024-09-06 11:31:07 -07:00
gm42
be710557e8 Go binding: allow cancelling snapshots and R/O transactions
It is beneficial to cancel a transaction, even if not performing any changes,
so that futures and other associated resources can be released early.
2024-08-28 09:32:49 +02:00
Syed Paymaan Raza
392bad2bd3
More copyright end year updates (#11556) 2024-08-05 14:00:32 -07:00
Jingyu Zhou
6d323de0ce
Merge pull request #11393 from gm42/fix/add-stop-network
Go binding: add StopNetwork()
2024-08-03 10:46:02 -07:00
Syed Paymaan Raza
c3e7542cda Update end year in copyright header 2024-08-02 09:40:11 -07:00
Giuseppe
1eaf861c3a
Documentation fix: datacenter_id does not need to be hexadecimal (#11519) 2024-07-24 12:39:53 -07:00
gm42
872c300a5c Go: return an error when calling StopNetwork() multiple times
Specify which functions are safe to be called from multiple goroutines
2024-07-19 08:49:25 +02:00
gm42
5cfc2d00cf Go: add StopNetwork method
Add a method which allows to a safe explicit stop of the network thread.
This method waits for the network thread to exit before returning to caller.
2024-07-19 08:49:25 +02:00
gm42
b593924edd Go: make sure that database creation happens only while network thread is running
All API calls which create a database are guaranteed to happen while the network thread is running;
there is no performance penalty for calls happening after network thread has already been started.

Notable change: if the call to run network thread fails, a panic will be generated instead of a logged error.
2024-07-19 08:49:25 +02:00
Giuseppe
ef7aa271ac
Go: do not automatically close database objects (#11394)
Setting the finalizer prevents user from calling Close(),
as it would randomly result in SIGSEGV or some other silent memory corruption.
No finalizer is set for the database and user is expected to call Close() to
avoid memory leaks.
2024-06-04 16:06:49 +02:00
Jingyu Zhou
426157795f
Merge pull request #11366 from gm42/fix/set-span-parent-doc
Go binding: do not commit read-only transactions
2024-05-29 08:36:07 -07:00
hao fu
6b782c10f6 Fix globalconfig refresh hang issue
CC sets a version to int_max in ClientDBInfo indicating a refresh, however,
proxy server would reject this version for the error of future_version.

This change fixes this issue by not sending int_max, instead maintaining a
lastKnown in memory and send it to grvproxy to get latest globalconfig.

this change also fixes some java tests that were used to test the fix
2024-05-14 15:40:03 -07:00
gm42
d1644f431f Do not commit read-only transactions
This a marginal improvement which follows the C API documentation:
> It is not necessary to commit a read-only transaction – you can simply call fdb_transaction_destroy().

Read-only transactions will be always destroyed before returning to caller,
without relying on Go garbage collection; the read-only transactions
can be destroyed so early because futures created within them must never be used
outside of them.
2024-05-15 00:02:05 +02:00
gm42
d52f7bf0cf Typo fix in Close() GoDoc 2024-05-15 00:02:04 +02:00
gm42
ae773d9157 Do not use pointer receiver for Close()
A mix of pointer/non-pointer receivers makes it impossible to use interfaces
2024-05-09 07:41:38 +02:00
Xiaoge Su
e65c6d2d33 fixup! Fix the ctest fialure at update_bindings_go_src_fdb_generated_go 2024-05-07 17:53:24 -07:00
Xiaoge Su
bfb0a33c01 Remove go get since it is not being supported anymore 2024-04-24 14:48:56 -07:00
Xiaoge Su
33fb8ff978 test: Split the go get/install command 2024-04-22 21:21:32 -07:00
Xiaoge Su
294e10c387 Add go.mod to the package 2024-04-22 18:44:33 -07:00
Xiaoge Su
c852e53875 fixup! Install build package
See: https://packaging.python.org/en/latest/tutorials/packaging-projects/
2024-04-22 18:44:33 -07:00
Xiaoge Su
f677af3432 fixup! Fix the generated.go issue
The CTest item

 * update_bindings_go_src_fdb_generated_go

will compare the generated go api with hardcoded go api to test the
generation. New FDB option will cause hardcoded go code outdated.
2024-04-22 18:44:32 -07:00
Xiaoge Su
010d070de0 Modernize the Python3 package build configuration 2024-04-22 18:44:32 -07:00
Xiaoge Su
b2e50721e4 fixup! Fix the regexp warning in generate_asm.py 2024-04-22 18:44:32 -07:00
Tom Parker-Shemilt
6452b701c5 Fix various Javadoc comments that break the doc build 2024-02-19 19:10:00 -06:00
Tom Parker-Shemilt
2f623f985d Add javadoc build 2024-02-19 19:10:00 -06:00
Boris Korzun
f7a443aea4 Add libfmt 10+ support (#11140) 2024-02-13 23:09:58 +03:00
Dimitris Apostolou
a88114c222
Fix typos 2024-02-07 01:16:00 +02:00
gm42
6b54636fb4 Go: simplify network start check logic
This change attempts to address the SIGSEGV happening when network routine is started
multiple times concurrently.
It changes the network mutex to be a RW mutex, to optimize the case
of calls when network is already started.

fatal error: unexpected signal during runtime execution
[signal SIGSEGV: segmentation violation code=0x1 addr=0x7f4600000011 pc=0x7f46a405678e]

runtime stack:
runtime.throw({0x1169773?, 0x7f46a479f96c?})
	/usr/local/go/src/runtime/panic.go:1047 +0x5d fp=0x7f465affb790 sp=0x7f465affb760 pc=0x44e45d
runtime.sigpanic()
	/usr/local/go/src/runtime/signal_unix.go:821 +0x3e9 fp=0x7f465affb7f0 sp=0x7f465affb790 pc=0x466e49

goroutine 60 [syscall]:
runtime.cgocall(0xf4f640, 0xc0001f7f80)
	/usr/local/go/src/runtime/cgocall.go:157 +0x6e fp=0xc0001f7f58 sp=0xc0001f7f20 pc=0x41840e
github.com/apple/foundationdb/bindings/go/src/fdb._Cfunc_fdb_run_network()
	_cgo_gotypes.go:378 +0x85 fp=0xc0001f7f80 sp=0xc0001f7f58 pc=0xd19d25
github.com/apple/foundationdb/bindings/go/src/fdb.startNetwork.func1()
	/home/user/go/pkg/mod/github.com/apple/foundationdb/bindings/go@v0.0.0-20221026173525-97cc643cef69/src/fdb/fdb.go:209 +0x2a fp=0xc0001f7fe0 sp=0xc0001f7f80 pc=0xd2704a
runtime.goexit()
	/usr/local/go/src/runtime/asm_amd64.s:1598 +0x1 fp=0xc0001f7fe8 sp=0xc0001f7fe0 pc=0x487741
created by github.com/apple/foundationdb/bindings/go/src/fdb.startNetwork
	/home/user/go/pkg/mod/github.com/apple/foundationdb/bindings/go@v0.0.0-20221026173525-97cc643cef69/src/fdb/fdb.go:208 +0x72

goroutine 1 [running]:
	goroutine running on other thread; stack unavailable
2023-12-14 12:49:48 +01:00
Dan Lambright
015167c17e
Throttle commits against hot shards (#10970)
* throttle hot shards

* expire throttled shards over time

* add backoff

* Parallelize messaging from RK to CP

* Obtain shards from a single SS

* handle expired transactions

* bump transaction_throttled_hot_shard

* Change SevError to SevWarn for CannotMonitorHotShardForSS

* Add log per request
2023-10-31 12:01:34 -04:00
Boris Korzun
ac30cb0783 Add preinstalled doctest support 2023-10-06 13:33:30 +03:00
Boris Korzun
e04f0467a0 Disable explicit std::filesystem linking on CLang 2023-10-05 17:23:26 +03:00
Johannes M. Scheuermann
79ce8e8d22 Add the linker option back again 2023-09-29 15:20:57 +02:00
Johannes M. Scheuermann
d974508599 Update CGO LDflags for new MacOS linker 2023-09-29 15:20:52 +02:00
Jingyu Zhou
872db26598
Merge pull request #10702 from DataDog/griffin/fix-db-panic-go
Fix panic when connecting to database from multiple threads in Go bindings
2023-09-26 12:56:33 -07:00
Andrew Noyes
f52cffd81b Fix MacOS go build
See
https://forums.foundationdb.org/t/macos-build-finds-wrong-fdb-c-h-for-go-bindings-patch-included/3929
for details
2023-08-28 10:22:06 -07:00
Johannes M. Scheuermann
c9a04d799d Fix the go tuple tests for new go version 2023-08-07 11:02:02 +02:00
Vishesh Yadav
e6cd1a10e0
Merge pull request #10603 from oleg68/main-locality-doc
Added more javadoc information for com.apple.foundationdb.LocalityUtil.getAddressesForKey
2023-07-21 13:09:47 -07:00
Jingyu Zhou
4b00018a33
Fix Implib.so imports when 'amd64' architecture is using (#10618)
Co-authored-by: Alexey Marchenko <santana705736@gmail.com>
2023-07-17 12:04:56 +02:00
Oleg Samarin
1cb0a860da Added more javadoc information for com.apple.foundationdb.LocalityUtil.getAddressesForKey
(cherry picked from commit af51830eafef881f6bfd880b17982ea62f7823c2)
2023-07-10 11:04:27 +03:00
Zhe Wu
5c8a163c72
Update main branch to 7.4 (#10459)
* Update main branch to 7.4

* Update API version to 740

* Makes fdb_c_client_config_tests.py passing after API version update

* Remove from_7.3.0_until_7.4.0 and add from_7.3.0

* Update tests in fdb_c_client_config_tests.py
2023-06-15 10:19:39 +02:00
hao fu
07c02e5e6b Add comments for VERSIONSTAMP_96_CODE 2023-06-13 09:50:29 -07:00
Griffin Dunn
819fc1ef59 fix clear cache 2023-06-08 11:42:49 -04:00
Griffin Dunn
205f7861af fix panic when connecting to multiple fdb dbs at once 2023-06-08 11:32:03 -04:00
Aaron Molitor
a718a31dd7 update links to foundationdb.org to reference GitHub 2023-05-30 10:15:20 -05:00
Vaidas Gasiunas
9bc55f67c3
Fix releasing watches on future cancellation (#10304)
* Test watch cleanup on cancel

* Fix clearing the database in Java integration tests

* Always cancel the futures wrapped by MVC abortable futures

* More tests for watch cleanup

* Fix clear database database in some Java integration tests
2023-05-22 22:01:27 +02:00
Andrew Noyes
4d2f038b60 Remove unnecessary duplicate declaration of fdb_tenant_list_blobbified_ranges 2023-05-18 16:20:18 -07:00