graphiti 1.6.2 → 1.6.3

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: c7e9a22a29df9a53ef4c2da7a6bb102c4407f21201440cd0888015c2442895b5
4
- data.tar.gz: 405ed0c5ee38118ef4b535bc5751dcb960630117ca9ca1706b69bb91eda6df4a
3
+ metadata.gz: d9fe56af10e2f476d55ff2d367e4efd0841f73afbe4d4f95cae0f9ab81f6a39e
4
+ data.tar.gz: 4d3037e59ed89ed1bfb5bd4af49d6cd80038661907d8983ecfd5a17afa96c061
5
5
  SHA512:
6
- metadata.gz: fa1bbea7813069ac8c97bacdb7d298162bc55121771974693264c81b5b85da9420aef3d3c0509e96013f9266861e6a0e8dc61853e88dcb88b7cc7c9ddf83fa99
7
- data.tar.gz: 9929dda99cd0fecbbac7939c1a161f43f20944921950cf8f4e8bb30c30251fcbf1f253364ee7fe4c7c442e4eafb7d74c6c2cb6347835f7cdbc71713c31938639
6
+ metadata.gz: f09aeaedda7fc10d97270fe89789fb1b038a2efe4615136fe1ccc576059c5af4b57c9bf97a0f79e38d240ba44f99b4d31f662b27a7d7f3128622bb8ae60429ef
7
+ data.tar.gz: 5c965ae2e16ceb97a7e2aa5341cff1e039a8f43d17c2766c884adfb9b0f1ae16fd5df16f1ca7973b3b27face19f80a6e541c43558f9dfbaedf72909b6ae8c361
data/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  graphiti changelog
2
2
 
3
+ ## [1.6.3](https://github.com/graphiti-api/graphiti/compare/v1.6.2...v1.6.3) (2024-03-26)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * Remove thread pool executor logic until we get a better handle on what's causing thread pool hangs. refs [#469](https://github.com/graphiti-api/graphiti/issues/469) ([7941b6f](https://github.com/graphiti-api/graphiti/commit/7941b6f75ce1001b034ed6e83c148b893e9f3d99)), closes [#471](https://github.com/graphiti-api/graphiti/issues/471) [#470](https://github.com/graphiti-api/graphiti/issues/470)
9
+
3
10
  ## [1.6.2](https://github.com/graphiti-api/graphiti/compare/v1.6.1...v1.6.2) (2024-03-22)
4
11
 
5
12
 
@@ -8,20 +8,6 @@ module Graphiti
8
8
  # Defaults to false OR if classes are cached (Rails-only)
9
9
  attr_accessor :concurrency
10
10
 
11
- # This number must be considered in accordance with the database
12
- # connection pool size configured in `database.yml`. The connection
13
- # pool should be large enough to accommodate both the foreground
14
- # threads (ie. web server or job worker threads) and background
15
- # threads. For each process, Graphiti will create one global
16
- # executor that uses this many threads to sideload resources
17
- # asynchronously. Thus, the pool size should be at least
18
- # `thread_count + concurrency_max_threads + 1`. For example, if your
19
- # web server has a maximum of 3 threads, and
20
- # `concurrency_max_threads` is set to 4, then your pool size should
21
- # be at least 8.
22
- # @return [Integer] Maximum number of threads to use when fetching sideloads concurrently
23
- attr_accessor :concurrency_max_threads
24
-
25
11
  attr_accessor :respond_to
26
12
  attr_accessor :context_for_endpoint
27
13
  attr_accessor :links_on_demand
@@ -40,7 +26,6 @@ module Graphiti
40
26
  def initialize
41
27
  @raise_on_missing_sideload = true
42
28
  @concurrency = false
43
- @concurrency_max_threads = 4
44
29
  @respond_to = [:json, :jsonapi, :xml]
45
30
  @links_on_demand = false
46
31
  @pagination_links_on_demand = false
@@ -2,23 +2,6 @@ module Graphiti
2
2
  class Scope
3
3
  attr_accessor :object, :unpaginated_object
4
4
  attr_reader :pagination
5
-
6
- @@thread_pool_executor_mutex = Mutex.new
7
-
8
- def self.thread_pool_executor
9
- return @thread_pool_executor if @thread_pool_executor
10
-
11
- concurrency = Graphiti.config.concurrency_max_threads || 4
12
- @@thread_pool_executor_mutex.synchronize do
13
- @@thread_pool_executor ||= Concurrent::ThreadPoolExecutor.new(
14
- min_threads: 0,
15
- max_threads: concurrency,
16
- max_queue: concurrency * 4,
17
- fallback_policy: :caller_runs
18
- )
19
- end
20
- end
21
-
22
5
  def initialize(object, resource, query, opts = {})
23
6
  @object = object
24
7
  @resource = resource
@@ -66,7 +49,7 @@ module Graphiti
66
49
  @resource.adapter.close if concurrent
67
50
  }
68
51
  if concurrent
69
- promises << Concurrent::Promise.execute(executor: self.class.thread_pool_executor, &resolve_sideload)
52
+ promises << Concurrent::Promise.execute(&resolve_sideload)
70
53
  else
71
54
  resolve_sideload.call
72
55
  end
@@ -1,3 +1,3 @@
1
1
  module Graphiti
2
- VERSION = "1.6.2"
2
+ VERSION = "1.6.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: graphiti
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.2
4
+ version: 1.6.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lee Richmond
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-03-22 00:00:00.000000000 Z
11
+ date: 2024-03-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jsonapi-serializable