rb_snowflake_client 1.1.3 → 1.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +1 -1
- data/Gemfile.lock +1 -1
- data/lib/ruby_snowflake/client/threaded_in_memory_strategy.rb +22 -22
- data/lib/ruby_snowflake/version.rb +1 -1
- 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: '06290ff3078af3cd8d969ae39a9a29fc1272c4b3ff722e49d4d5bdc28a78724f'
|
4
|
+
data.tar.gz: 7b04238f59bbb34ce3f72db9fd1edb9551adfff299b42b2cc3fb72397c211bec
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 52e50c1a4b0f89503c9972fba9a410dcdbd3d5428e6d9c2cd6f25d3d6fb2dc637d300f3dc260ae61cb4fe7105d203e39f3bc8d1435bfed5773d298113171c8d1
|
7
|
+
data.tar.gz: a962f2c4e87ce35347bb5320092ac7f6fa14a0ee00f18b821b0b2703ca95ab69a4027b7441d3150b2a2ebe26cbe93be253bfd6c04ed9245a14ca490da1d28111
|
data/.github/workflows/ci.yml
CHANGED
@@ -33,7 +33,7 @@ jobs:
|
|
33
33
|
SNOWFLAKE_URI: ${{ secrets.SNOWFLAKE_URI }}
|
34
34
|
SNOWFLAKE_ORGANIZATION: ${{ secrets.SNOWFLAKE_ORGANIZATION }}
|
35
35
|
SNOWFLAKE_ACCOUNT: ${{ secrets.SNOWFLAKE_ACCOUNT }}
|
36
|
-
SNOWFLAKE_DEFAULT_WAREHOUSE:
|
36
|
+
SNOWFLAKE_DEFAULT_WAREHOUSE: ${{ secrets.SNOWFLAKE_DEFAULT_WAREHOUSE }}
|
37
37
|
SNOWFLAKE_USER: ${{ secrets.SNOWFLAKE_USER }}
|
38
38
|
SNOWFLAKE_PASSWORD: ${{ secrets.SNOWFLAKE_PASSWORD }}
|
39
39
|
SNOWFLAKE_PRIVATE_KEY: ${{ secrets.SNOWFLAKE_CLIENT_TEST_PRIVATE_KEY }}
|
data/Gemfile.lock
CHANGED
@@ -9,31 +9,31 @@ module RubySnowflake
|
|
9
9
|
result[0] = statement_json_body["data"]
|
10
10
|
|
11
11
|
thread_pool = Concurrent::FixedThreadPool.new(num_threads)
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
[index, retreive_proc.call(index)]
|
12
|
+
partitions
|
13
|
+
.each_with_index.map do |partition, index|
|
14
|
+
next if index == 0 # already have the first partition
|
15
|
+
[index, Concurrent::Future.execute(executor: thread_pool) { retreive_proc.call(index) }]
|
17
16
|
end
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
17
|
+
.each do |entry|
|
18
|
+
next if entry.nil? # 0th index
|
19
|
+
|
20
|
+
index, future = entry
|
21
|
+
if future.rejected?
|
22
|
+
if future.reason.is_a? RubySnowflake::Error
|
23
|
+
raise future.reason
|
24
|
+
else
|
25
|
+
raise ConnectionStarvedError.new(
|
26
|
+
"A partition request timed out. This is usually do to using the client in" \
|
27
|
+
"multiple threads. The client uses a connection thread pool and if too many" \
|
28
|
+
"requests are all done in threads at the same time, threads can get starved" \
|
29
|
+
"of access to connections. The solution for this is to either increase the " \
|
30
|
+
"max_connections parameter on the client or create a new client instance" \
|
31
|
+
"with it's own connection pool to snowflake per thread. Rejection reason: #{future.reason.message}"
|
32
|
+
)
|
33
|
+
end
|
32
34
|
end
|
35
|
+
result[index] = future.value
|
33
36
|
end
|
34
|
-
index, partition_data = future.value
|
35
|
-
result[index] = partition_data
|
36
|
-
end
|
37
37
|
result
|
38
38
|
end
|
39
39
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rb_snowflake_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rinsed
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-11-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: concurrent-ruby
|