fdb 6.3.24 → 7.1.1

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: aa63f82c4277d3adc863d18f1bafd5cfb353e0c35f225625ebca11a742287270
4
+ data.tar.gz: 524b1032e0a107e602d5460ac94e8cb31658de225f1ea26791cc7696eb0ad5c5
5
5
  SHA512:
6
- metadata.gz: 7a41539300d186b4c135589a1e9c1ad9e1688f3d3bcf750b93e2f075253c8b9886eacc98ed54915870f4fac7bd41310ed93665818d956186bc3038c6b7c4f6a2
7
- data.tar.gz: 8d89f884431547efbfb746537a3bf025fbae78cc639d0d2f1de545b1923408c7b9369abc9e2532fabe4c8d6a61d5c0b9b7c7f94fc08e79b22127fc6ffc342ef1
6
+ metadata.gz: 5cff3ac086978c13a60e3d2edf5d90f523f8a907c5174c89de65c30f9de781fe94d2a242187ed8c67597cf47022e49bfafa2f70109abb311f406843af40b8d3b
7
+ data.tar.gz: 69c7eac72cdaedf13e0da552005ac84a52937a51dd8319fc8e2e034f3e9fcc7a387b9f19726aabeee0ad65301bb5ef5235892714805073fb02a42f38da48fc15
@@ -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 = 710
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)
@@ -33,7 +33,7 @@ module FDB
33
33
  "TRACE_FORMAT" => [34, "Select the format of the log files. xml (the default) and json are supported.", '', "Format of trace files"],
34
34
  "TRACE_CLOCK_SOURCE" => [35, "Select clock source for trace files. now (the default) or realtime are supported.", '', "Trace clock source"],
35
35
  "TRACE_FILE_IDENTIFIER" => [36, "Once provided, this string will be used to replace the port/PID in the log file names.", '', "The identifier that will be part of all trace file names"],
36
- "TRACE_PARTIAL_FILE_SUFFIX" => [39, "", '', "Append this suffix to partially written log files. When a log file is complete, it is renamed to remove the suffix. No separator is added between the file and the suffix. If you want to add a file extension, you should include the separator - e.g. '.tmp' instead of 'tmp' to add the 'tmp' extension."],
36
+ "TRACE_PARTIAL_FILE_SUFFIX" => [39, "Set file suffix for partially written log files.", '', "Append this suffix to partially written log files. When a log file is complete, it is renamed to remove the suffix. No separator is added between the file and the suffix. If you want to add a file extension, you should include the separator - e.g. '.tmp' instead of 'tmp' to add the 'tmp' extension."],
37
37
  "KNOB" => [40, "Set internal tuning or debugging knobs", '', "knob_name=knob_value"],
38
38
  "TLS_PLUGIN" => [41, "Deprecated", '', "file path or linker-resolved name"],
39
39
  "TLS_CERT_BYTES" => [42, "Set the certificate chain", '', "certificates"],
@@ -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 = {
@@ -76,8 +77,10 @@ module FDB
76
77
  "TRANSACTION_MAX_RETRY_DELAY" => [502, "Set the maximum amount of backoff delay incurred in the call to ``onError`` if the error is retryable. This sets the ``max_retry_delay`` option of each transaction created by this database. See the transaction option description for more information.", 0, "value in milliseconds of maximum delay"],
77
78
  "TRANSACTION_SIZE_LIMIT" => [503, "Set the maximum transaction size in bytes. This sets the ``size_limit`` option on each transaction created by this database. See the transaction option description for more information.", 0, "value in bytes"],
78
79
  "TRANSACTION_CAUSAL_READ_RISKY" => [504, "The read version will be committed, and usually will be the latest committed, but might not be the latest committed in the event of a simultaneous fault and misbehaving clock.", nil, nil],
79
- "TRANSACTION_INCLUDE_PORT_IN_ADDRESS" => [505, "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],
80
+ "TRANSACTION_INCLUDE_PORT_IN_ADDRESS" => [505, "Deprecated. 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],
80
81
  "TRANSACTION_BYPASS_UNREADABLE" => [700, "Allows ``get`` operations to read from sections of keyspace that have become unreadable because of versionstamp operations. This sets the ``bypass_unreadable`` option of each transaction created by this database. See the transaction option description for more information.", nil, nil],
82
+ "USE_CONFIG_DATABASE" => [800, "Use configuration database.", nil, nil],
83
+ "TEST_CAUSAL_READ_RISKY" => [900, "An integer between 0 and 100 (default is 0) expressing the probability that a client will verify it can't read stale data whenever it detects a recovery.", nil, nil],
81
84
  }
82
85
 
83
86
  @@TransactionOption = {
@@ -86,7 +89,7 @@ module FDB
86
89
  "CAUSAL_READ_DISABLE" => [21, "", nil, nil],
87
90
  "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
91
  "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],
92
+ "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
93
  "READ_AHEAD_DISABLE" => [52, "Deprecated", nil, nil],
91
94
  "DURABILITY_DATACENTER" => [110, "", nil, nil],
92
95
  "DURABILITY_RISKY" => [120, "", nil, nil],
@@ -94,8 +97,9 @@ module FDB
94
97
  "PRIORITY_SYSTEM_IMMEDIATE" => [200, "Specifies that this transaction should be treated as highest priority and that lower priority transactions should block behind this one. Use is discouraged outside of low-level tools", nil, nil],
95
98
  "PRIORITY_BATCH" => [201, "Specifies that this transaction should be treated as low priority and that default priority transactions will be processed first. Batch priority transactions will also be throttled at load levels smaller than for other types of transactions and may be fully cut off in the event of machine failures. Useful for doing batch work simultaneously with latency-sensitive work", nil, nil],
96
99
  "INITIALIZE_NEW_DATABASE" => [300, "This is a write-only transaction which sets the initial configuration. This option is designed for use by database system tools only.", nil, nil],
97
- "ACCESS_SYSTEM_KEYS" => [301, "Allows this transaction to read and modify system keys (those that start with the byte 0xFF)", nil, nil],
98
- "READ_SYSTEM_KEYS" => [302, "Allows this transaction to read system keys (those that start with the byte 0xFF)", nil, nil],
100
+ "ACCESS_SYSTEM_KEYS" => [301, "Allows this transaction to read and modify system keys (those that start with the byte 0xFF). Implies raw_access.", nil, nil],
101
+ "READ_SYSTEM_KEYS" => [302, "Allows this transaction to read system keys (those that start with the byte 0xFF). Implies raw_access.", nil, nil],
102
+ "RAW_ACCESS" => [303, "Allows this transaction to access the raw key-space when tenant mode is on.", nil, nil],
99
103
  "DEBUG_RETRY_LOGGING" => [401, "", '', "Optional transaction name"],
100
104
  "TRANSACTION_LOGGING_ENABLE" => [402, "Deprecated", '', "String identifier to be used in the logs when tracing this transaction. The identifier must not exceed 100 characters."],
101
105
  "DEBUG_TRANSACTION_IDENTIFIER" => [403, "Sets a client provided identifier for the transaction that will be used in scenarios like tracing or profiling. Client trace logging or transaction profiling must be separately enabled.", '', "String identifier to be used when tracing or profiling this transaction. The identifier must not exceed 100 characters."],
@@ -114,9 +118,13 @@ module FDB
114
118
  "USE_PROVISIONAL_PROXIES" => [711, "This option should only be used by tools which change the database configuration.", nil, nil],
115
119
  "REPORT_CONFLICTING_KEYS" => [712, "The transaction can retrieve keys that are conflicting with other transactions.", nil, nil],
116
120
  "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],
121
+ "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
122
  "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
123
  "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."],
124
+ "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"],
125
+ "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
126
  "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],
127
+ "USE_GRV_CACHE" => [1101, "Allows this transaction to use cached GRV from the database context. Defaults to off. Upon first usage, starts a background updater to periodically update the cache to avoid stale read versions.", nil, nil],
120
128
  }
121
129
 
122
130
  @@StreamingMode = {
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.1.1
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-12 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: []