virgodb 0.2.0-x86_64-linux-gnu → 0.3.0-x86_64-linux-gnu

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: b2c55249e7aad1d1fa30b2e5b0b33faeededd48155b6a1d31cad1d66c86f150f
4
- data.tar.gz: e7f80300627403933ea3dcfb0bc3e8e3321caa3b0f0d11309238978fa65915a0
3
+ metadata.gz: 6141e1a5628b4293f7d63bd3143fe20bcbff6f697df38fc67c1da4c2669369ab
4
+ data.tar.gz: 7814e9e3a10ba0ce4e5126e492d38410637aa818d21abb4352b6f038fc9b4139
5
5
  SHA512:
6
- metadata.gz: '00849d11354b21ffa53f665b607aad25114b02f78d296b9b8594016962ea378eb1bdcc905c77d5024e1cf4376b28af183da2c3918d30965bba7f3080547d238e'
7
- data.tar.gz: b8190d81fdcd7276cf12ead7c054a10e8e61d6f25daa2f39ad42f2166b8118c917cfe031b26cfbfa6239d420ad4ba5ce8e3e8c14b010028c8e8b019871df4d83
6
+ metadata.gz: '0468833ba6f07aed2d56ea13ca5d158a523fb64486ec4fa5259c969200f9c4e991fb96a545ad26a78c8531460855c59dcbcc0904be5a8d43f558dd2bb4f27255'
7
+ data.tar.gz: 475c654f9a604b83c05b0036c4cdffb478c339b05fb794a9cef445b5244584394cef90289bbb57cdc8f7c65a8918fb7a8111e545d9a790c6b375eca454929a47
data/lib/virgodb/table.rb CHANGED
@@ -101,6 +101,29 @@ module Virgodb
101
101
  json && JSON.parse(json)
102
102
  end
103
103
 
104
+ # Claims this table's maintenance lease as `holder` for the next
105
+ # `lease_duration_secs` seconds, locking out the real maintenance
106
+ # thread (its own claim attempts fail against an unexpired lease the
107
+ # same way two maintenance threads would contend) -- meant for a
108
+ # caller like a backup job that needs a window where compaction/vacuum
109
+ # won't rewrite or delete this table's data directory. Returns `false`
110
+ # (not an error) if someone else's lease is still active; callers
111
+ # should retry rather than treat that as failure. Doesn't call `writer`
112
+ # first (unlike `tombstone` above) -- claiming a lease has nothing to
113
+ # do with this table's Writer, and a caller like a backup job may never
114
+ # otherwise touch this table's Writer in this process at all. Not
115
+ # mutex-guarded, same reasoning as `query`/`maintenance_health` above.
116
+ def claim_maintenance_lease(holder:, lease_duration_secs:)
117
+ Virgodb.claim_maintenance_lease(@manifest_path, @sql_table_name, holder.to_s, lease_duration_secs)
118
+ end
119
+
120
+ # Releases a lease claimed via `claim_maintenance_lease` above, so the
121
+ # real maintenance thread can resume on its next poll rather than
122
+ # waiting out the full lease duration.
123
+ def release_maintenance_lease(holder:)
124
+ Virgodb.release_maintenance_lease(@manifest_path, @sql_table_name, holder.to_s)
125
+ end
126
+
104
127
  private
105
128
 
106
129
  def writer
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Virgodb
4
- VERSION = "0.2.0"
4
+ VERSION = "0.3.0"
5
5
  end
Binary file
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: virgodb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: x86_64-linux-gnu
6
6
  authors:
7
7
  - virgodb
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-08-23 00:00:00.000000000 Z
11
+ date: 2026-09-02 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: |
14
14
  Embeds virgodb (an OLAP engine backed by Parquet + DataFusion) directly into a Ruby process