statelydb 0.1.3 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/common/net/conn.rb +8 -1
- data/lib/key_path.rb +2 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 712caae72447e18fda3456a1b70a9d1c6067994c9d084e715b6b0c0b92bd583f
|
4
|
+
data.tar.gz: 993afea8590f64f6a06c414508052aa42291654a1379e44da31b4da686d38f84
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f02e87c5fa5bf878b8a4421d3950a9a967dc3239f43f015ee670b1fb44ece8361f9a7314d224bd1f13ab258e002187d9aa5a6e69477781064d6c7493c33e2687
|
7
|
+
data.tar.gz: 270c30a9b29b264faf23ba1b842993bcb1a5d271b8cebcc6055980c8d311e180b92b617ca26fc29d0223b0c60f7a9b522df9dad1db03b591b6f9208c5aa757b5
|
data/lib/common/net/conn.rb
CHANGED
@@ -20,13 +20,20 @@ module StatelyDB
|
|
20
20
|
creds.compose(call_creds)
|
21
21
|
end
|
22
22
|
GRPC::Core::Channel.new(endpoint_uri.authority, {
|
23
|
+
# This map contains grpc channel settings.
|
24
|
+
# Find the full list of supported keys
|
25
|
+
# here: https://grpc.github.io/grpc/core/group__grpc__arg__keys.html
|
26
|
+
|
23
27
|
# 2x the default of 8kb = 16kb
|
24
28
|
# Set max and absolute max to the same value
|
25
29
|
# to stop the grpc lib changing the error code to ResourceExhausted
|
26
30
|
# while still successfully reading the metadata because only the soft
|
27
31
|
# limit was exceeded.
|
28
32
|
"grpc.max_metadata_size" => 8192 * 2,
|
29
|
-
"grpc.absolute_max_metadata_size" => 8192 * 2
|
33
|
+
"grpc.absolute_max_metadata_size" => 8192 * 2,
|
34
|
+
# allow unlimited receive message length while we debug a flaky test
|
35
|
+
# https://app.clickup.com/t/8689hem75
|
36
|
+
"grpc.max_receive_message_length" => -1
|
30
37
|
}, creds)
|
31
38
|
end
|
32
39
|
end
|
data/lib/key_path.rb
CHANGED
@@ -48,16 +48,14 @@ module StatelyDB
|
|
48
48
|
end
|
49
49
|
|
50
50
|
# If the value is a binary string, encode it as a url-safe base64 string with padding removed.
|
51
|
-
# Note that we also prepend the value with the ~ sigil to indicate that it is a base64 string.
|
52
51
|
#
|
53
52
|
# @param [String, StatelyDB::UUID, #to_s] value The value to convert to a key id.
|
54
53
|
# @return [String]
|
55
54
|
def self.to_key_id(value)
|
56
55
|
if value.is_a?(StatelyDB::UUID)
|
57
|
-
|
56
|
+
value.to_base64
|
58
57
|
elsif value.is_a?(String) && value.encoding == Encoding::BINARY
|
59
|
-
|
60
|
-
"~#{b64_value}"
|
58
|
+
[value].pack("m0").tr("=", "").tr("+/", "-_")
|
61
59
|
else
|
62
60
|
# Any other value is just converted to a string
|
63
61
|
value.to_s
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: statelydb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stately Cloud, Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-09-
|
11
|
+
date: 2024-09-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: async
|