legion-data 1.10.2 → 1.10.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 212e01a164b58ab2a8a4273497e98acf0d99f174f4a66a77c7c707899685f2ed
4
- data.tar.gz: e3302347dd4f8d3ce634fc88110a645ad6986aa5d8b531d5a9187fe894872ae0
3
+ metadata.gz: 2489246ac60704ae24678b24c75ab7d2e8f4153d332f3ad1d61f062a4e5c1c9c
4
+ data.tar.gz: 03e7b2217887a809525bdbf10337af382b1059638ce04c65c3c6bca31f517cc2
5
5
  SHA512:
6
- metadata.gz: 6399d19fe35c9b3e975522d6d2b4654d0bc56240e508a38bcf55c4cb064fbb1214f7e2c5de7f3c4828a79f8543044da476811808d574b020609ab20adcc8d778
7
- data.tar.gz: 87e1b1e58c66e464cbb1ccf41ad2a1917531edff611dcef0fc0f6b20f7dfe9331f854e684c00ace11557c714cd77e6131cd2a6b07c837f60d670c0d9fdf9b704
6
+ metadata.gz: 5bd7a8abc3a69bcf9ad7c7da89a3937057af7e10516b2070ea60eb0d893b9f09c83570b3535af5949ce0bf3138a7b4e6cd5302eac0bd0b09b259da84e432a9dd
7
+ data.tar.gz: b934c3058f683f0905a84590f41eb0da21db6ba8c9d221201e5a444c47e486c3cec1dedc14f058ebff7ea8c0637fe67d9bbbae66b108d211529909db3ef4e968
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Legion::Data Changelog
2
2
 
3
+ ## [1.10.3] - 2026-06-10
4
+
5
+ ### Changed
6
+ - `connection_validation` now defaults to `false` — the Sequel connection_validator extension issues a `SELECT NULL` on every pool checkout/checkin and before real queries, which measurably degrades throughput; query-time error handling already recovers stale/dead connections. Set `connection_validation: true` in settings to opt back in (timeout semantics unchanged: `-1` validates every checkout)
7
+ - Pool timeout assignments read `connection_validation_timeout` / `connection_expiration_timeout` directly from settings — removed inline `|| 600` / `|| 14_400` shadow defaults that disagreed with the documented settings defaults
8
+
3
9
  ## [1.10.2] - 2026-06-02
4
10
 
5
11
  ### Fixed
@@ -581,12 +581,12 @@ module Legion
581
581
 
582
582
  if data[:connection_validation] != false
583
583
  @sequel.extension(:connection_validator)
584
- @sequel.pool.connection_validation_timeout = data[:connection_validation_timeout] || 600
584
+ @sequel.pool.connection_validation_timeout = data[:connection_validation_timeout]
585
585
  end
586
586
 
587
587
  if data[:connection_expiration] != false
588
588
  @sequel.extension(:connection_expiration)
589
- @sequel.pool.connection_expiration_timeout = data[:connection_expiration_timeout] || 14_400
589
+ @sequel.pool.connection_expiration_timeout = data[:connection_expiration_timeout]
590
590
  end
591
591
  rescue StandardError => e
592
592
  handle_exception(e, level: :warn, handled: true, operation: :configure_extensions, adapter: adapter)
@@ -0,0 +1,23 @@
1
+ # frozen_string_literal: true
2
+
3
+ Sequel.migration do
4
+ up do
5
+ alter_table(:llm_route_attempts) do
6
+ add_column :operation, String, size: 64, null: true
7
+ add_column :dispatch_path, String, size: 32, null: true
8
+ add_column :idempotency_key, String, size: 128, null: true
9
+ add_index :operation, name: :idx_route_attempts_operation
10
+ add_index :idempotency_key, name: :idx_route_attempts_idempotency_key
11
+ end
12
+ end
13
+
14
+ down do
15
+ alter_table(:llm_route_attempts) do
16
+ drop_index :operation, name: :idx_route_attempts_operation
17
+ drop_index :idempotency_key, name: :idx_route_attempts_idempotency_key
18
+ drop_column :operation
19
+ drop_column :dispatch_path
20
+ drop_column :idempotency_key
21
+ end
22
+ end
23
+ end
@@ -48,8 +48,12 @@ module Legion
48
48
  sql_log_level: 'debug',
49
49
 
50
50
  # Connection health (network adapters only, ignored for sqlite)
51
- # -1 means validate on every checkout, catching stale connections from VPN/sleep/network changes immediately
52
- connection_validation: true,
51
+ # Validation is disabled by default: the connection_validator extension issues a
52
+ # SELECT NULL on every checkout/checkin and before real queries, which kills
53
+ # throughput. Connection errors are already rescued and reconnected at query time.
54
+ # When enabled, connection_validation_timeout: -1 validates on every checkout
55
+ # (catches stale connections from VPN/sleep/network changes immediately).
56
+ connection_validation: false,
53
57
  connection_validation_timeout: -1,
54
58
  connection_expiration: true,
55
59
  connection_expiration_timeout: 14_400,
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Legion
4
4
  module Data
5
- VERSION = '1.10.2'
5
+ VERSION = '1.10.3'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: legion-data
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.10.2
4
+ version: 1.10.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Esity
@@ -280,6 +280,7 @@ files:
280
280
  - lib/legion/data/migrations/131_add_llm_tool_calls_schema_version.rb
281
281
  - lib/legion/data/migrations/132_drop_schema_version_from_llm_tool_calls.rb
282
282
  - lib/legion/data/migrations/133_allow_null_context_tokens.rb
283
+ - lib/legion/data/migrations/134_add_route_attempt_columns.rb
283
284
  - lib/legion/data/model.rb
284
285
  - lib/legion/data/models/apollo/access_log.rb
285
286
  - lib/legion/data/models/apollo/entries.rb