fdb 6.3.24 → 7.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 39f4963105b2c39f5cfb0e8231c3e7e3e756302f2517329815df357846b0d836
4
- data.tar.gz: 573bb77a1c7816ecc2523e22f1d2ce96d50deefdd8c3eaf41f66fb038a8599f6
3
+ metadata.gz: 4f3127e83e97e5bb3c973d60530dd1b123082c8546974d73c85fdc0d9f144b4b
4
+ data.tar.gz: b0425030bab66699aa5a654e3f30771b7ab43a986e22a32f2b9034ec8ff582f7
5
5
  SHA512:
6
- metadata.gz: 7a41539300d186b4c135589a1e9c1ad9e1688f3d3bcf750b93e2f075253c8b9886eacc98ed54915870f4fac7bd41310ed93665818d956186bc3038c6b7c4f6a2
7
- data.tar.gz: 8d89f884431547efbfb746537a3bf025fbae78cc639d0d2f1de545b1923408c7b9369abc9e2532fabe4c8d6a61d5c0b9b7c7f94fc08e79b22127fc6ffc342ef1
6
+ metadata.gz: 5e65eb8d0274e958bd7280f7400729a34dfd2aa8e56f40516da5e2feaaff36c6f3028e1d1e52ad9f3a5b9bf4dde38cdbf9fbbae6a43eec1e94f1b3f940084eac
7
+ data.tar.gz: a2cfb35fc5b6a6f3db52d71d74d6687220187306ce65071013438051a6f72c19cee1a16f1d521d3a600f6b5426da77e3aded308dba849c60a40a740a5a74a812
@@ -36,7 +36,7 @@ module FDB
36
36
  end
37
37
  end
38
38
  def self.api_version(version)
39
- header_version = 630
39
+ header_version = 700
40
40
  if self.is_api_version_selected?()
41
41
  if @@chosen_version != version
42
42
  raise "FDB API already loaded at version #{@@chosen_version}."
@@ -109,6 +109,7 @@ module FDB
109
109
  attach_function :fdb_transaction_get_key, [ :pointer, :pointer, :int, :int, :int, :int ], :pointer
110
110
  attach_function :fdb_transaction_get_range, [ :pointer, :pointer, :int, :int, :int, :pointer, :int, :int, :int, :int, :int, :int, :int, :int, :int ], :pointer
111
111
  attach_function :fdb_transaction_get_estimated_range_size_bytes, [ :pointer, :pointer, :int, :pointer, :int ], :pointer
112
+ attach_function :fdb_transaction_get_range_split_points, [ :pointer, :pointer, :int, :pointer, :int, :int64 ], :pointer
112
113
  attach_function :fdb_transaction_set, [ :pointer, :pointer, :int, :pointer, :int ], :void
113
114
  attach_function :fdb_transaction_clear, [ :pointer, :pointer, :int ], :void
114
115
  attach_function :fdb_transaction_clear_range, [ :pointer, :pointer, :int, :pointer, :int ], :void
@@ -129,6 +130,12 @@ module FDB
129
130
  :value_length, :int
130
131
  end
131
132
 
133
+ class KeyStruct < FFI::Struct
134
+ pack 4
135
+ layout :key, :pointer,
136
+ :key_length, :int
137
+ end
138
+
132
139
  def self.check_error(code)
133
140
  raise Error.new(code) if code.nonzero?
134
141
  nil
@@ -472,6 +479,22 @@ module FDB
472
479
  end
473
480
  end
474
481
 
482
+ class FutureKeyArray < Future
483
+ def wait
484
+ block_until_ready
485
+
486
+ ks = FFI::MemoryPointer.new :pointer
487
+ count = FFI::MemoryPointer.new :int
488
+ FDBC.check_error FDBC.fdb_future_get_key_array(@fpointer, kvs, count)
489
+ ks = ks.read_pointer
490
+
491
+ (0..count.read_int-1).map{|i|
492
+ x = FDBC::KeyStruct.new(ks + (i * FDBC::KeyStruct.size))
493
+ x[:key].read_bytes(x[:key_length])
494
+ }
495
+ end
496
+ end
497
+
475
498
  class FutureStringArray < LazyFuture
476
499
  def getter
477
500
  strings = FFI::MemoryPointer.new :pointer
@@ -825,6 +848,15 @@ module FDB
825
848
  Int64Future.new(FDBC.fdb_transaction_get_estimated_range_size_bytes(@tpointer, bkey, bkey.bytesize, ekey, ekey.bytesize))
826
849
  end
827
850
 
851
+ def get_range_split_points(begin_key, end_key, chunk_size)
852
+ if chunk_size <=0
853
+ raise ArgumentError, "Invalid chunk size"
854
+ end
855
+ bkey = FDB.key_to_bytes(begin_key)
856
+ ekey = FDB.key_to_bytes(end_key)
857
+ FutureKeyArray.new(FDBC.fdb_transaction_get_range_split_points(@tpointer, bkey, bkey.bytesize, ekey, ekey.bytesize, chunk_size))
858
+ end
859
+
828
860
  end
829
861
 
830
862
  TransactionRead.class_variable_set("@@StreamingMode", @@StreamingMode)
@@ -61,6 +61,7 @@ module FDB
61
61
  "CLIENT_BUGGIFY_DISABLE" => [81, "Disable client buggify", nil, nil],
62
62
  "CLIENT_BUGGIFY_SECTION_ACTIVATED_PROBABILITY" => [82, "Set the probability of a CLIENT_BUGGIFY section being active for the current execution.", 0, "probability expressed as a percentage between 0 and 100"],
63
63
  "CLIENT_BUGGIFY_SECTION_FIRED_PROBABILITY" => [83, "Set the probability of an active CLIENT_BUGGIFY section being fired. A section will only fire if it was activated", 0, "probability expressed as a percentage between 0 and 100"],
64
+ "DISTRIBUTED_CLIENT_TRACER" => [90, "Set a tracer to run on the client. Should be set to the same value as the tracer set on the server.", '', "Distributed tracer type. Choose from none, log_file, or network_lossy"],
64
65
  }
65
66
 
66
67
  @@DatabaseOption = {
@@ -86,7 +87,7 @@ module FDB
86
87
  "CAUSAL_READ_DISABLE" => [21, "", nil, nil],
87
88
  "INCLUDE_PORT_IN_ADDRESS" => [23, "Addresses returned by get_addresses_for_key include the port when enabled. As of api version 630, this option is enabled by default and setting this has no effect.", nil, nil],
88
89
  "NEXT_WRITE_NO_WRITE_CONFLICT_RANGE" => [30, "The next write performed on this transaction will not generate a write conflict range. As a result, other transactions which read the key(s) being modified by the next write will not conflict with this transaction. Care needs to be taken when using this option on a transaction that is shared between multiple threads. When setting this option, write conflict ranges will be disabled on the next write operation, regardless of what thread it is on.", nil, nil],
89
- "READ_YOUR_WRITES_DISABLE" => [51, "Reads performed by a transaction will not see any prior mutations that occured in that transaction, instead seeing the value which was in the database at the transaction's read version. This option may provide a small performance benefit for the client, but also disables a number of client-side optimizations which are beneficial for transactions which tend to read and write the same keys within a single transaction.", nil, nil],
90
+ "READ_YOUR_WRITES_DISABLE" => [51, "Reads performed by a transaction will not see any prior mutations that occured in that transaction, instead seeing the value which was in the database at the transaction's read version. This option may provide a small performance benefit for the client, but also disables a number of client-side optimizations which are beneficial for transactions which tend to read and write the same keys within a single transaction. It is an error to set this option after performing any reads or writes on the transaction.", nil, nil],
90
91
  "READ_AHEAD_DISABLE" => [52, "Deprecated", nil, nil],
91
92
  "DURABILITY_DATACENTER" => [110, "", nil, nil],
92
93
  "DURABILITY_RISKY" => [120, "", nil, nil],
@@ -114,8 +115,11 @@ module FDB
114
115
  "USE_PROVISIONAL_PROXIES" => [711, "This option should only be used by tools which change the database configuration.", nil, nil],
115
116
  "REPORT_CONFLICTING_KEYS" => [712, "The transaction can retrieve keys that are conflicting with other transactions.", nil, nil],
116
117
  "SPECIAL_KEY_SPACE_RELAXED" => [713, "By default, the special key space will only allow users to read from exactly one module (a subspace in the special key space). Use this option to allow reading from zero or more modules. Users who set this option should be prepared for new modules, which may have different behaviors than the modules they're currently reading. For example, a new module might block or return an error.", nil, nil],
118
+ "SPECIAL_KEY_SPACE_ENABLE_WRITES" => [714, "By default, users are not allowed to write to special keys. Enable this option will implicitly enable all options required to achieve the configuration change.", nil, nil],
117
119
  "TAG" => [800, "Adds a tag to the transaction that can be used to apply manual targeted throttling. At most 5 tags can be set on a transaction.", '', "String identifier used to associated this transaction with a throttling group. Must not exceed 16 characters."],
118
120
  "AUTO_THROTTLE_TAG" => [801, "Adds a tag to the transaction that can be used to apply manual or automatic targeted throttling. At most 5 tags can be set on a transaction.", '', "String identifier used to associated this transaction with a throttling group. Must not exceed 16 characters."],
121
+ "SPAN_PARENT" => [900, "Adds a parent to the Span of this transaction. Used for transaction tracing. A span can be identified with any 16 bytes", '', "A byte string of length 16 used to associate the span of this transaction with a parent"],
122
+ "EXPENSIVE_CLEAR_COST_ESTIMATION_ENABLE" => [1000, "Asks storage servers for how many bytes a clear key range contains. Otherwise uses the location cache to roughly estimate this.", nil, nil],
119
123
  "BYPASS_UNREADABLE" => [1100, "Allows ``get`` operations to read from sections of keyspace that have become unreadable because of versionstamp operations. These reads will view versionstamp operations as if they were set operations that did not fill in the versionstamp.", nil, nil],
120
124
  }
121
125
 
metadata CHANGED
@@ -1,19 +1,22 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fdb
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.3.24
4
+ version: 7.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - FoundationDB
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-03-02 00:00:00.000000000 Z
11
+ date: 2022-04-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ffi
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.1'
17
20
  - - ">="
18
21
  - !ruby/object:Gem::Version
19
22
  version: 1.1.5
@@ -21,6 +24,9 @@ dependencies:
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
27
+ - - "~>"
28
+ - !ruby/object:Gem::Version
29
+ version: '1.1'
24
30
  - - ">="
25
31
  - !ruby/object:Gem::Version
26
32
  version: 1.1.5
@@ -45,7 +51,7 @@ files:
45
51
  - "/home/foundationdb_ci/src/oOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOo/foundationdb/bindings/ruby/lib/fdbtuple.rb"
46
52
  homepage: https://www.foundationdb.org
47
53
  licenses:
48
- - Apache v2
54
+ - Apache-2.0
49
55
  metadata: {}
50
56
  post_install_message:
51
57
  rdoc_options: []