virgodb 0.2.0-x86_64-linux-gnu → 0.4.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 +4 -4
- data/lib/virgodb/table.rb +35 -0
- data/lib/virgodb/version.rb +1 -1
- data/lib/virgodb/virgodb_ruby.so +0 -0
- 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: 7f2b2b64a9eb427278ad164d7d0e6d1fffe25153a474037ca9955c320e9973d0
|
|
4
|
+
data.tar.gz: 15a4fafc1e21e3ad7db4cef580e2f90eef042cadc85f1e292eecdc3984130c08
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: fff30689328b67c225d5ffb0a3596052f16f8d256125a819f33168cc7af2679e5f540f6c6052263e99d16a682fedd7455a6b3f63c70b63a1b6a6be65b233c0bd
|
|
7
|
+
data.tar.gz: b12f81151f9b5f0ccfd900bb63fc2d2038f023512fced52e812dc521514c09ef4e8571414c26999f6482715ccb62d53c58c0730c05fc9745eeab464db270ce50
|
data/lib/virgodb/table.rb
CHANGED
|
@@ -101,6 +101,41 @@ 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
|
+
|
|
127
|
+
# Extends a lease claimed via `claim_maintenance_lease` above without
|
|
128
|
+
# needing it to expire first -- calling `claim_maintenance_lease` again
|
|
129
|
+
# on a lease you already validly hold is a guaranteed no-op, not a
|
|
130
|
+
# renewal (see `Manifest::renew_maintenance_lease`'s own doc comment).
|
|
131
|
+
# For a caller whose work under the lease might run longer than one
|
|
132
|
+
# fixed grant. Returns `false` (not an error) if `holder` no longer
|
|
133
|
+
# matches the current holder -- treat that as "lost the lease," not
|
|
134
|
+
# something to retry blindly.
|
|
135
|
+
def renew_maintenance_lease(holder:, lease_duration_secs:)
|
|
136
|
+
Virgodb.renew_maintenance_lease(@manifest_path, @sql_table_name, holder.to_s, lease_duration_secs)
|
|
137
|
+
end
|
|
138
|
+
|
|
104
139
|
private
|
|
105
140
|
|
|
106
141
|
def writer
|
data/lib/virgodb/version.rb
CHANGED
data/lib/virgodb/virgodb_ruby.so
CHANGED
|
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.
|
|
4
|
+
version: 0.4.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-
|
|
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
|