slatedb 0.4.2-aarch64-linux → 0.5.0-aarch64-linux
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/README.md +31 -0
- data/lib/slatedb/3.3/slatedb.so +0 -0
- data/lib/slatedb/3.4/slatedb.so +0 -0
- data/lib/slatedb/4.0/slatedb.so +0 -0
- data/lib/slatedb/admin.rb +28 -0
- data/lib/slatedb/database.rb +58 -0
- data/lib/slatedb/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: ed29074506d3ec0998e585cf316ce03e2518aab3e42ec26704e2f41cb2df6f25
|
|
4
|
+
data.tar.gz: 18a4c04c383ea51511db610953a055d4416ae41a1acb21ad44cd743a6d617ee2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7d54388635318353eaf700ef410c1aed4fd2c2a2ff434ad5e6cba98d5046ec6e6e1c8968f62be9e44b35336b64364972ad8336c54a248496425533caf82d1fe4
|
|
7
|
+
data.tar.gz: f4e74b56361d0b76f395704554ed50c180a05629ef9329599b1e938ed562a74a65a3ca33273481fb6976ccae2e0f10076fae150e980728ae9b786067eb99b74d
|
data/README.md
CHANGED
|
@@ -561,8 +561,19 @@ admin.run_gc(min_age: 3600_000) # Set min age for all directorie
|
|
|
561
561
|
admin.run_gc(manifest_min_age: 86400_000) # Custom age for manifest (1 day)
|
|
562
562
|
admin.run_gc(wal_min_age: 60_000) # Custom age for WAL (1 minute)
|
|
563
563
|
admin.run_gc(compacted_min_age: 60_000) # Custom age for compacted (1 minute)
|
|
564
|
+
|
|
565
|
+
# Delete a database (SlateDB >= 0.16.0)
|
|
566
|
+
would_delete = admin.delete_db # Dry run: returns the object paths
|
|
567
|
+
# that *would* be deleted, deleting nothing
|
|
568
|
+
deleted = admin.delete_db(confirm: true) # Actually delete; returns the removed paths
|
|
564
569
|
```
|
|
565
570
|
|
|
571
|
+
`delete_db` is idempotent, and a confirmed delete of a directory that is not a
|
|
572
|
+
SlateDB database (no manifest and no in-progress deletion marker) is refused, so
|
|
573
|
+
a mistyped path cannot wipe an unrelated directory. For a cloned database, any
|
|
574
|
+
checkpoints it pinned in parent databases are stripped before its own objects
|
|
575
|
+
are removed.
|
|
576
|
+
|
|
566
577
|
### Flushing
|
|
567
578
|
|
|
568
579
|
Ensure all writes are persisted:
|
|
@@ -572,6 +583,26 @@ db.put("key", "value")
|
|
|
572
583
|
db.flush
|
|
573
584
|
```
|
|
574
585
|
|
|
586
|
+
By default, `flush` flushes the write-ahead log (WAL) if enabled, otherwise the
|
|
587
|
+
memtable. You can choose explicitly with `flush_type:` (SlateDB >= 0.16.0):
|
|
588
|
+
|
|
589
|
+
```ruby
|
|
590
|
+
db.flush(flush_type: :wal) # Flush the write-ahead log
|
|
591
|
+
db.flush(flush_type: :memtable) # Freeze and flush memtable entries to object storage
|
|
592
|
+
```
|
|
593
|
+
|
|
594
|
+
### Closing
|
|
595
|
+
|
|
596
|
+
Closing flushes the active memtable first by default, so durable writes are not
|
|
597
|
+
lost. You can control the final flush when closing (SlateDB >= 0.16.0):
|
|
598
|
+
|
|
599
|
+
```ruby
|
|
600
|
+
db.close # Flush the memtable, then close (default)
|
|
601
|
+
db.close(flush_type: :wal) # Flush the WAL before closing
|
|
602
|
+
db.close(flush: false) # Close without a final flush; writes that are not
|
|
603
|
+
# yet durable may be lost
|
|
604
|
+
```
|
|
605
|
+
|
|
575
606
|
## Thread Safety
|
|
576
607
|
|
|
577
608
|
**SlateDB is fully thread-safe and optimized for concurrent access.**
|
data/lib/slatedb/3.3/slatedb.so
CHANGED
|
Binary file
|
data/lib/slatedb/3.4/slatedb.so
CHANGED
|
Binary file
|
data/lib/slatedb/4.0/slatedb.so
CHANGED
|
Binary file
|
data/lib/slatedb/admin.rb
CHANGED
|
@@ -118,5 +118,33 @@ module SlateDb
|
|
|
118
118
|
opts[:min_age] = min_age if min_age
|
|
119
119
|
_run_gc(opts)
|
|
120
120
|
end
|
|
121
|
+
|
|
122
|
+
# Delete a database, removing its objects from the object store
|
|
123
|
+
# (SlateDB >= 0.16.0).
|
|
124
|
+
#
|
|
125
|
+
# For a cloned database, any checkpoints it pinned in parent databases are
|
|
126
|
+
# stripped before its own objects are removed.
|
|
127
|
+
#
|
|
128
|
+
# By default this performs a dry run: it returns the object paths that
|
|
129
|
+
# *would* be deleted without removing anything. Pass +confirm: true+ to
|
|
130
|
+
# actually delete. A confirmed delete of a directory that is not a SlateDB
|
|
131
|
+
# database (no manifest and no in-progress deletion marker) is refused, so a
|
|
132
|
+
# mistyped path cannot wipe an unrelated directory. The operation is
|
|
133
|
+
# idempotent.
|
|
134
|
+
#
|
|
135
|
+
# @param confirm [Boolean] When false (the default), performs a dry run and
|
|
136
|
+
# returns the paths that would be deleted. When true, deletes and returns
|
|
137
|
+
# the paths that were removed.
|
|
138
|
+
# @return [Array<String>] Object paths deleted (or that would be deleted)
|
|
139
|
+
#
|
|
140
|
+
# @example Preview what would be deleted
|
|
141
|
+
# admin.delete_db.each { |path| puts path }
|
|
142
|
+
#
|
|
143
|
+
# @example Actually delete the database
|
|
144
|
+
# deleted = admin.delete_db(confirm: true)
|
|
145
|
+
#
|
|
146
|
+
def delete_db(confirm: false)
|
|
147
|
+
_delete_db(confirm)
|
|
148
|
+
end
|
|
121
149
|
end
|
|
122
150
|
end
|
data/lib/slatedb/database.rb
CHANGED
|
@@ -506,5 +506,63 @@ module SlateDb
|
|
|
506
506
|
def metrics
|
|
507
507
|
_metrics
|
|
508
508
|
end
|
|
509
|
+
|
|
510
|
+
# Flush in-memory writes to object storage.
|
|
511
|
+
#
|
|
512
|
+
# With no arguments this flushes pending writes durably, matching the
|
|
513
|
+
# previous behavior. Pass +flush_type+ to control what is flushed
|
|
514
|
+
# (SlateDB >= 0.16.0).
|
|
515
|
+
#
|
|
516
|
+
# @param flush_type [Symbol, String, nil] Which data to flush: :wal to flush
|
|
517
|
+
# the write-ahead log, or :memtable to freeze and flush memtable entries
|
|
518
|
+
# to object storage. When nil (the default), SlateDB flushes the WAL if
|
|
519
|
+
# enabled, otherwise the memtable.
|
|
520
|
+
# @return [void]
|
|
521
|
+
#
|
|
522
|
+
# @example Flush pending writes
|
|
523
|
+
# db.flush
|
|
524
|
+
#
|
|
525
|
+
# @example Explicitly flush the WAL
|
|
526
|
+
# db.flush(flush_type: :wal)
|
|
527
|
+
#
|
|
528
|
+
def flush(flush_type: nil)
|
|
529
|
+
if flush_type.nil?
|
|
530
|
+
_flush
|
|
531
|
+
else
|
|
532
|
+
_flush_with_options(flush_type.to_s)
|
|
533
|
+
end
|
|
534
|
+
end
|
|
535
|
+
|
|
536
|
+
# Close the database.
|
|
537
|
+
#
|
|
538
|
+
# By default the active memtable is flushed before closing (matching the
|
|
539
|
+
# previous behavior). Pass +flush: false+ to close without a final flush,
|
|
540
|
+
# in which case writes that are not yet durable may be lost
|
|
541
|
+
# (SlateDB >= 0.16.0).
|
|
542
|
+
#
|
|
543
|
+
# @param flush [Boolean] Whether to flush before closing (default: true)
|
|
544
|
+
# @param flush_type [Symbol, String, nil] When flushing, which data to
|
|
545
|
+
# flush: :wal or :memtable. Defaults to :memtable. Ignored when
|
|
546
|
+
# +flush: false+.
|
|
547
|
+
# @return [void]
|
|
548
|
+
#
|
|
549
|
+
# @example Close (flushing the memtable first)
|
|
550
|
+
# db.close
|
|
551
|
+
#
|
|
552
|
+
# @example Close without flushing
|
|
553
|
+
# db.close(flush: false)
|
|
554
|
+
#
|
|
555
|
+
# @example Flush the WAL before closing
|
|
556
|
+
# db.close(flush_type: :wal)
|
|
557
|
+
#
|
|
558
|
+
def close(flush: true, flush_type: nil)
|
|
559
|
+
if !flush
|
|
560
|
+
_close_with_options(nil)
|
|
561
|
+
elsif flush_type.nil?
|
|
562
|
+
_close
|
|
563
|
+
else
|
|
564
|
+
_close_with_options(flush_type.to_s)
|
|
565
|
+
end
|
|
566
|
+
end
|
|
509
567
|
end
|
|
510
568
|
end
|
data/lib/slatedb/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: slatedb
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.5.0
|
|
5
5
|
platform: aarch64-linux
|
|
6
6
|
authors:
|
|
7
7
|
- SlateDB Contributors
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-10-26 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rake
|