pigeonhole-db 1.2.2 → 1.3.0
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/Cargo.lock +16 -16
- data/Cargo.toml +5 -5
- data/lib/pigeonhole/version.rb +1 -1
- data/vendor/bundle/ruby/3.4.0/extensions/x86_64-linux/3.4.0/io-event-1.22.3/IO_Event.so +0 -0
- data/vendor/bundle/ruby/3.4.0/extensions/x86_64-linux/3.4.0/io-event-1.22.3/gem_make.out +6 -6
- data/vendor/bundle/ruby/3.4.0/extensions/x86_64-linux/3.4.0/io-event-1.22.3/mkmf.log +26 -26
- data/vendor/bundle/ruby/3.4.0/extensions/x86_64-linux/3.4.0/json-3.1.0/gem_make.out +6 -6
- data/vendor/bundle/ruby/3.4.0/extensions/x86_64-linux/3.4.0/json-3.1.0/json/ext/generator.so +0 -0
- data/vendor/bundle/ruby/3.4.0/extensions/x86_64-linux/3.4.0/json-3.1.0/json/ext/parser.so +0 -0
- data/vendor/bundle/ruby/3.4.0/extensions/x86_64-linux/3.4.0/json-3.1.0/mkmf.log +19 -19
- data/vendor/bundle/ruby/3.4.0/extensions/x86_64-linux/3.4.0/prism-1.9.0/gem_make.out +9 -9
- data/vendor/bundle/ruby/3.4.0/extensions/x86_64-linux/3.4.0/prism-1.9.0/mkmf.log +6 -6
- data/vendor/bundle/ruby/3.4.0/extensions/x86_64-linux/3.4.0/prism-1.9.0/prism/prism.so +0 -0
- data/vendor/bundle/ruby/3.4.0/extensions/x86_64-linux/3.4.0/rbs-4.2.0/gem_make.out +6 -6
- data/vendor/bundle/ruby/3.4.0/extensions/x86_64-linux/3.4.0/rbs-4.2.0/mkmf.log +7 -7
- data/vendor/bundle/ruby/3.4.0/extensions/x86_64-linux/3.4.0/rbs-4.2.0/rbs_extension.so +0 -0
- data/vendor/bundle/ruby/3.4.0/gems/io-event-1.22.3/ext/Makefile +3 -3
- data/vendor/bundle/ruby/3.4.0/gems/io-event-1.22.3/lib/IO_Event.so +0 -0
- data/vendor/bundle/ruby/3.4.0/gems/json-3.1.0/ext/json/ext/generator/Makefile +3 -3
- data/vendor/bundle/ruby/3.4.0/gems/json-3.1.0/ext/json/ext/parser/Makefile +3 -3
- data/vendor/bundle/ruby/3.4.0/gems/json-3.1.0/lib/json/ext/generator.so +0 -0
- data/vendor/bundle/ruby/3.4.0/gems/json-3.1.0/lib/json/ext/parser.so +0 -0
- data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/ext/prism/Makefile +3 -3
- data/vendor/bundle/ruby/3.4.0/gems/prism-1.9.0/lib/prism/prism.so +0 -0
- data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/ext/rbs_extension/Makefile +3 -3
- data/vendor/bundle/ruby/3.4.0/gems/rbs-4.2.0/lib/rbs_extension.so +0 -0
- data/vendor/cache/Cargo.toml +2 -2
- data/vendor/cache/src/lib.rs +37 -0
- data/vendor/cache/src/loom_tests.rs +32 -0
- data/vendor/cache/src/s3fifo.rs +239 -11
- data/vendor/cache/src/sync.rs +4 -4
- data/vendor/compaction/Cargo.toml +6 -6
- data/vendor/compaction/src/cursor.rs +86 -4
- data/vendor/compaction/src/job.rs +24 -2
- data/vendor/engine/Cargo.toml +11 -11
- data/vendor/engine/src/admission.rs +3 -1
- data/vendor/engine/src/catalog.rs +39 -4
- data/vendor/engine/src/check.rs +59 -20
- data/vendor/engine/src/compact.rs +2 -2
- data/vendor/engine/src/engine/hooks.rs +144 -2
- data/vendor/engine/src/engine/info.rs +6 -0
- data/vendor/engine/src/engine.rs +1492 -50
- data/vendor/engine/src/external_registry.rs +447 -0
- data/vendor/engine/src/feed.rs +313 -84
- data/vendor/engine/src/feed_reader/catalog.rs +490 -0
- data/vendor/engine/src/feed_reader/history.rs +236 -0
- data/vendor/engine/src/feed_reader/read_ahead.rs +241 -0
- data/vendor/engine/src/feed_reader/token.rs +232 -0
- data/vendor/engine/src/feed_reader.rs +970 -852
- data/vendor/engine/src/feed_stop_loom.rs +73 -0
- data/vendor/engine/src/flush.rs +29 -4
- data/vendor/engine/src/io_count.rs +190 -0
- data/vendor/engine/src/large.rs +4 -1
- data/vendor/engine/src/lib.rs +16 -2
- data/vendor/engine/src/maintenance.rs +2 -2
- data/vendor/engine/src/manifest.rs +38 -6
- data/vendor/engine/src/nonblocking.rs +3 -3
- data/vendor/engine/src/options.rs +26 -0
- data/vendor/engine/src/punch.rs +282 -0
- data/vendor/engine/src/range_copy.rs +365 -0
- data/vendor/engine/src/read/keys.rs +37 -5
- data/vendor/engine/src/read/reduce.rs +1 -0
- data/vendor/engine/src/read.rs +7 -0
- data/vendor/engine/src/row_cache.rs +24 -0
- data/vendor/engine/src/shard/tablets.rs +127 -31
- data/vendor/engine/src/shard.rs +1006 -33
- data/vendor/engine/src/source.rs +105 -12
- data/vendor/engine/src/write.rs +310 -4
- data/vendor/format/Cargo.toml +1 -1
- data/vendor/format/src/shm.rs +10 -0
- data/vendor/format/src/superblock.rs +9 -2
- data/vendor/format/src/wal.rs +818 -16
- data/vendor/io/Cargo.toml +3 -3
- data/vendor/io/src/count.rs +76 -0
- data/vendor/io/src/file.rs +70 -0
- data/vendor/io/src/lib.rs +2 -0
- data/vendor/io/src/os/unix.rs +124 -0
- data/vendor/io/src/os/windows.rs +51 -0
- data/vendor/io/src/pread.rs +26 -0
- data/vendor/io/src/sim.rs +81 -9
- data/vendor/io/src/sys.rs +53 -0
- data/vendor/io/src/uring.rs +28 -0
- data/vendor/io/src/vfs.rs +4 -0
- data/vendor/memory/Cargo.toml +4 -4
- data/vendor/memory/src/hooks.rs +6 -0
- data/vendor/memory/src/ivf.rs +67 -1
- data/vendor/memory/src/lib.rs +4 -1
- data/vendor/memory/src/recall/pool.rs +872 -0
- data/vendor/memory/src/recall.rs +351 -273
- data/vendor/memory/src/store.rs +15 -0
- data/vendor/memtable/Cargo.toml +3 -3
- data/vendor/pager/Cargo.toml +3 -3
- data/vendor/pager/src/alloc.rs +430 -0
- data/vendor/pager/src/lib.rs +114 -0
- data/vendor/pigeonhole/Cargo.toml +6 -5
- data/vendor/pigeonhole/src/db.rs +91 -2
- data/vendor/pigeonhole/src/error.rs +2 -1
- data/vendor/pigeonhole/src/feed.rs +210 -6
- data/vendor/pigeonhole/src/lib.rs +3 -0
- data/vendor/pigeonhole/src/metrics.rs +37 -0
- data/vendor/pigeonhole/src/nonblocking.rs +94 -111
- data/vendor/pigeonhole/src/options.rs +69 -0
- data/vendor/pigeonhole/src/replication.rs +601 -11
- data/vendor/pigeonhole/src/write.rs +81 -0
- data/vendor/runtime/Cargo.toml +2 -2
- data/vendor/shm/Cargo.toml +3 -3
- data/vendor/shm/src/region.rs +20 -2
- data/vendor/sst/Cargo.toml +4 -4
- data/vendor/sst/src/blob.rs +85 -7
- data/vendor/sst/src/iter.rs +98 -2
- data/vendor/sst/src/lib.rs +11 -2
- data/vendor/sst/src/writer.rs +12 -2
- data/vendor/text/Cargo.toml +2 -2
- data/vendor/text/src/block.rs +638 -0
- data/vendor/text/src/error.rs +8 -3
- data/vendor/text/src/fuzzy.rs +1 -1
- data/vendor/text/src/index.rs +1055 -80
- data/vendor/text/src/layout.rs +63 -2
- data/vendor/text/src/lib.rs +5 -1
- data/vendor/text/src/maxscore.rs +481 -94
- data/vendor/text/src/merged.rs +470 -0
- data/vendor/text/src/search.rs +1278 -341
- data/vendor/text/src/stats.rs +431 -0
- data/vendor/vector/Cargo.toml +2 -2
- data/vendor/vector/src/hooks.rs +33 -4
- data/vendor/vector/src/index.rs +498 -69
- data/vendor/wal/Cargo.toml +3 -3
- data/vendor/wal/src/feed.rs +313 -19
- data/vendor/wal/src/recovery.rs +31 -1
- data/vendor/wal/src/stream.rs +28 -0
- metadata +15 -1
data/vendor/engine/src/source.rs
CHANGED
|
@@ -19,7 +19,7 @@ use pigeonhole_format::scan::ScanFilter;
|
|
|
19
19
|
use pigeonhole_format::{FamilyId, TabletId};
|
|
20
20
|
use pigeonhole_memtable::{ArenaSlice, MemIter, MemtableReader};
|
|
21
21
|
use pigeonhole_runtime::ShardId;
|
|
22
|
-
use pigeonhole_sst::{ReadOptions, SstIter};
|
|
22
|
+
use pigeonhole_sst::{ReadOptions, ScanStop, SstIter};
|
|
23
23
|
use smallvec::SmallVec;
|
|
24
24
|
|
|
25
25
|
use crate::snapshot::{FamilySsts, MemSet, OpenSst, SstSet, View};
|
|
@@ -177,6 +177,25 @@ impl Source {
|
|
|
177
177
|
}
|
|
178
178
|
}
|
|
179
179
|
|
|
180
|
+
/// Whether a jump stop (`ReadOptions::stop_jumps`, a one-row memtable cursor) left the
|
|
181
|
+
/// source on a key its filter didn't admit since this was last asked, clearing it (#1931).
|
|
182
|
+
#[inline]
|
|
183
|
+
pub(crate) fn take_stopped(&mut self) -> bool {
|
|
184
|
+
match self {
|
|
185
|
+
Source::Mem(it) => it.take_stopped(),
|
|
186
|
+
Source::Sst(s) => s.iter.take_stopped(),
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
/// Settles a source from where it stands: one a jump stop left on a key its filter
|
|
191
|
+
/// didn't admit, which a multi-get's next key already lies at or before (#1931).
|
|
192
|
+
pub(crate) fn resettle(&mut self) -> Result<()> {
|
|
193
|
+
match self {
|
|
194
|
+
Source::Mem(it) => Ok(it.resettle()?),
|
|
195
|
+
Source::Sst(s) => s.resettle(),
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
|
|
180
199
|
/// The uncached blocks an SST source's next steps read, up to `max`, appended to `out`
|
|
181
200
|
/// ([`SstSource::upcoming`]; nothing for other sources).
|
|
182
201
|
pub(crate) fn upcoming(&self, max: usize, out: &mut Vec<pigeonhole_sst::Fetch>) {
|
|
@@ -212,9 +231,14 @@ pub(crate) type Merged = MergingCursor<Source>;
|
|
|
212
231
|
/// The MVCC resolver over them.
|
|
213
232
|
pub(crate) type Resolver = CellResolver<Merged>;
|
|
214
233
|
|
|
215
|
-
/// Memtable sources of `set`, newest first.
|
|
216
|
-
|
|
217
|
-
|
|
234
|
+
/// Memtable sources of `set`, newest first. `one_row`: the read stays within one row, so a
|
|
235
|
+
/// filtered source's jump past it ends there (#1924).
|
|
236
|
+
pub(crate) fn mem_sources(set: &MemSet, filter: &ScanFilter, one_row: bool, out: &mut Vec<Source>) {
|
|
237
|
+
for r in &set.readers {
|
|
238
|
+
out.push(Source::Mem(
|
|
239
|
+
FilteredCursor::lazy(r.iter(), filter.clone()).one_row(one_row),
|
|
240
|
+
));
|
|
241
|
+
}
|
|
218
242
|
}
|
|
219
243
|
|
|
220
244
|
/// Memtable sources over `readers`, in their order. Filtered ones are lazy (D288): a scan's or
|
|
@@ -283,6 +307,7 @@ pub(crate) fn read_options(
|
|
|
283
307
|
// A point get or a single-row read stops at its row's end: an SST cursor need not
|
|
284
308
|
// read the block after a row-end separator (ICR 0039).
|
|
285
309
|
o.one_row = true;
|
|
310
|
+
o.stop_jumps = true;
|
|
286
311
|
}
|
|
287
312
|
o.cache_only = cache_only;
|
|
288
313
|
o
|
|
@@ -300,9 +325,31 @@ pub(crate) fn sst_sources_range<const CACHE_ONLY: bool>(
|
|
|
300
325
|
end: Option<&[u8]>,
|
|
301
326
|
priority: Priority,
|
|
302
327
|
short: bool,
|
|
328
|
+
one_row: bool,
|
|
329
|
+
out: &mut Vec<Source>,
|
|
330
|
+
) -> Result<()> {
|
|
331
|
+
let mut opts = read_options(priority, true, short, CACHE_ONLY);
|
|
332
|
+
// A scan of one row (`RowRead::cells`, the text crate's posting reads) ends at its row
|
|
333
|
+
// as a row read does: a filtered cursor's jump past it stops there (#1924).
|
|
334
|
+
opts.one_row = one_row;
|
|
335
|
+
opts.stop_jumps = one_row;
|
|
336
|
+
sst_sources_with::<CACHE_ONLY>(fam, set, filter, start, end, priority, opts, out)
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
/// [`sst_sources_range`] with its read options given: a range move's copy reads without
|
|
340
|
+
/// filling the block cache (D331, perf287), as compaction does.
|
|
341
|
+
#[allow(clippy::too_many_arguments)]
|
|
342
|
+
pub(crate) fn sst_sources_with<const CACHE_ONLY: bool>(
|
|
343
|
+
fam: &FamilySsts,
|
|
344
|
+
set: &Arc<SstSet>,
|
|
345
|
+
filter: &ScanFilter,
|
|
346
|
+
start: Option<&[u8]>,
|
|
347
|
+
end: Option<&[u8]>,
|
|
348
|
+
priority: Priority,
|
|
349
|
+
opts: ReadOptions,
|
|
303
350
|
out: &mut Vec<Source>,
|
|
304
351
|
) -> Result<()> {
|
|
305
|
-
let
|
|
352
|
+
let first = out.len();
|
|
306
353
|
let reader = |sst: &OpenSst| {
|
|
307
354
|
if CACHE_ONLY {
|
|
308
355
|
sst.reader_cache_only(set, priority)
|
|
@@ -338,6 +385,22 @@ pub(crate) fn sst_sources_range<const CACHE_ONLY: bool>(
|
|
|
338
385
|
opts,
|
|
339
386
|
)?));
|
|
340
387
|
}
|
|
388
|
+
// A filtered scan of several rows with an end: a jump that lands at or past the end
|
|
389
|
+
// stops there, as the scan's resolver does, rather than jumping on row by row through
|
|
390
|
+
// the rest of the SST (#1931). Built once for the scan's sources, only when one is
|
|
391
|
+
// filtered (an unfiltered cursor never jumps).
|
|
392
|
+
if let Some(end) = end
|
|
393
|
+
&& !opts.one_row
|
|
394
|
+
&& !filter.is_all()
|
|
395
|
+
&& out.len() > first
|
|
396
|
+
{
|
|
397
|
+
let stop: ScanStop = Arc::new(Box::from(end));
|
|
398
|
+
for source in &mut out[first..] {
|
|
399
|
+
if let Source::Sst(s) = source {
|
|
400
|
+
s.set_stop(&stop);
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
}
|
|
341
404
|
Ok(())
|
|
342
405
|
}
|
|
343
406
|
|
|
@@ -441,6 +504,8 @@ struct Level {
|
|
|
441
504
|
set: Arc<SstSet>,
|
|
442
505
|
filter: ScanFilter,
|
|
443
506
|
opts: ReadOptions,
|
|
507
|
+
/// Where the scan ends, for each SST the level opens ([`SstIter::set_stop`]).
|
|
508
|
+
stop: Option<ScanStop>,
|
|
444
509
|
/// Index in `files` of the open SST.
|
|
445
510
|
at: usize,
|
|
446
511
|
/// A seek has positioned the cursor: before one, the open SST's cursor is invalid
|
|
@@ -465,11 +530,35 @@ impl Level {
|
|
|
465
530
|
self.files[i].reader(&self.set, self.opts.priority)?
|
|
466
531
|
};
|
|
467
532
|
self.at = i;
|
|
468
|
-
|
|
533
|
+
let mut iter = reader.iter(self.filter.clone(), self.opts);
|
|
534
|
+
// Only a filtered bounded scan has one: the rest skip the clone and the store.
|
|
535
|
+
if let Some(stop) = &self.stop {
|
|
536
|
+
iter.set_stop(Some(Arc::clone(stop)));
|
|
537
|
+
}
|
|
538
|
+
Ok(iter)
|
|
469
539
|
}
|
|
470
540
|
}
|
|
471
541
|
|
|
472
542
|
impl SstSource {
|
|
543
|
+
/// Settles the open SST's cursor from where it stands ([`SstIter::resettle`]); run out,
|
|
544
|
+
/// a level moves on to its next SST.
|
|
545
|
+
fn resettle(&mut self) -> Result<()> {
|
|
546
|
+
self.iter.resettle()?;
|
|
547
|
+
if self.level.is_some() && !self.iter.valid() {
|
|
548
|
+
self.next_file()?;
|
|
549
|
+
}
|
|
550
|
+
Ok(())
|
|
551
|
+
}
|
|
552
|
+
|
|
553
|
+
/// Ends the scan's filtered jumps at `stop` ([`SstIter::set_stop`]), for the open SST and
|
|
554
|
+
/// the ones the level opens next.
|
|
555
|
+
fn set_stop(&mut self, stop: &ScanStop) {
|
|
556
|
+
self.iter.set_stop(Some(Arc::clone(stop)));
|
|
557
|
+
if let Some(level) = &mut self.level {
|
|
558
|
+
level.stop = Some(Arc::clone(stop));
|
|
559
|
+
}
|
|
560
|
+
}
|
|
561
|
+
|
|
473
562
|
/// Switches cache-only reads on or off for the open SST and the ones the level opens
|
|
474
563
|
/// next (an async scan positions cache-only, then steps reading normally; ICR 0014).
|
|
475
564
|
pub(crate) fn set_cache_only(&mut self, on: bool) {
|
|
@@ -524,6 +613,7 @@ impl SstSource {
|
|
|
524
613
|
set,
|
|
525
614
|
filter,
|
|
526
615
|
opts,
|
|
616
|
+
stop: None,
|
|
527
617
|
at: 0,
|
|
528
618
|
positioned: false,
|
|
529
619
|
past_row: Vec::new(),
|
|
@@ -832,11 +922,12 @@ impl View {
|
|
|
832
922
|
out: &mut Vec<Source>,
|
|
833
923
|
) -> Result<()> {
|
|
834
924
|
let l = self.locate(shard, tablet, family);
|
|
835
|
-
self.scan_sources_located::<CACHE_ONLY>(&l, filter, start, end, false, out)
|
|
925
|
+
self.scan_sources_located::<CACHE_ONLY>(&l, filter, start, end, false, false, out)
|
|
836
926
|
}
|
|
837
927
|
|
|
838
928
|
/// [`View::scan_sources_into`] from a [`View::locate`] the caller already made, its SST
|
|
839
|
-
/// cursors' readahead starting later if the scan is `short` ([`scan_is_short`]).
|
|
929
|
+
/// cursors' readahead starting later if the scan is `short` ([`scan_is_short`]). A scan of
|
|
930
|
+
/// one row (`one_row`) ends at its row as a row read does (#1924).
|
|
840
931
|
#[allow(clippy::too_many_arguments)]
|
|
841
932
|
pub(crate) fn scan_sources_located<const CACHE_ONLY: bool>(
|
|
842
933
|
&self,
|
|
@@ -845,14 +936,15 @@ impl View {
|
|
|
845
936
|
start: Option<&[u8]>,
|
|
846
937
|
end: Option<&[u8]>,
|
|
847
938
|
short: bool,
|
|
939
|
+
one_row: bool,
|
|
848
940
|
out: &mut Vec<Source>,
|
|
849
941
|
) -> Result<()> {
|
|
850
942
|
if let Some(set) = l.mems {
|
|
851
|
-
mem_sources(set, filter, out);
|
|
943
|
+
mem_sources(set, filter, one_row, out);
|
|
852
944
|
}
|
|
853
945
|
if let Some(fam) = l.ssts {
|
|
854
946
|
sst_sources_range::<CACHE_ONLY>(
|
|
855
|
-
fam, &self.ssts, filter, start, end, l.priority, short, out,
|
|
947
|
+
fam, &self.ssts, filter, start, end, l.priority, short, one_row, out,
|
|
856
948
|
)?;
|
|
857
949
|
}
|
|
858
950
|
Ok(())
|
|
@@ -881,7 +973,7 @@ impl View {
|
|
|
881
973
|
let mut markers = false;
|
|
882
974
|
if let Some(set) = l.mems {
|
|
883
975
|
markers = set.readers.iter().any(MemtableReader::may_have_markers);
|
|
884
|
-
mem_sources(set, &all, out);
|
|
976
|
+
mem_sources(set, &all, false, out);
|
|
885
977
|
}
|
|
886
978
|
if let Some(fam) = l.ssts
|
|
887
979
|
&& !fam.is_empty()
|
|
@@ -906,7 +998,7 @@ impl View {
|
|
|
906
998
|
) -> Result<()> {
|
|
907
999
|
let l = self.locate(shard, tablet, family);
|
|
908
1000
|
if let Some(set) = l.mems {
|
|
909
|
-
mem_sources(set, filter, out);
|
|
1001
|
+
mem_sources(set, filter, true, out);
|
|
910
1002
|
}
|
|
911
1003
|
if let Some(fam) = l.ssts
|
|
912
1004
|
&& !fam.is_empty()
|
|
@@ -1220,6 +1312,7 @@ mod level_tests {
|
|
|
1220
1312
|
end.as_deref(),
|
|
1221
1313
|
Priority::Normal,
|
|
1222
1314
|
true,
|
|
1315
|
+
false,
|
|
1223
1316
|
&mut out,
|
|
1224
1317
|
)
|
|
1225
1318
|
.unwrap();
|
data/vendor/engine/src/write.rs
CHANGED
|
@@ -308,6 +308,23 @@ impl WriteBatch {
|
|
|
308
308
|
Ok(())
|
|
309
309
|
}
|
|
310
310
|
|
|
311
|
+
/// Marks the batch feed-silent (D331, ICR 0141): logged, durable and applied as any
|
|
312
|
+
/// commit, replicated to a replica database, but never delivered to a change-feed
|
|
313
|
+
/// subscription. A range move's copy and its source's cleanup write so, as the range's
|
|
314
|
+
/// history isn't new there. The first silent commit sets `incompat` bit 3, which builds
|
|
315
|
+
/// without D331 refuse. On a replica database only a [`push_logged`](Self::push_logged)
|
|
316
|
+
/// batch may carry it (its primary's silent commit). Not part of the stable API.
|
|
317
|
+
#[doc(hidden)]
|
|
318
|
+
pub fn mark_feed_silent(&mut self) {
|
|
319
|
+
self.builder.mark_silent();
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
/// Whether [`mark_feed_silent`](Self::mark_feed_silent) marked it.
|
|
323
|
+
#[doc(hidden)]
|
|
324
|
+
pub fn is_feed_silent(&self) -> bool {
|
|
325
|
+
self.builder.is_silent()
|
|
326
|
+
}
|
|
327
|
+
|
|
311
328
|
/// Whether it holds a primary's logged mutations ([`push_logged`](Self::push_logged),
|
|
312
329
|
/// D315 PR 3): routed as logged, never converted or prepared again. The mark is the
|
|
313
330
|
/// builder's (`BatchBuilder::is_logged`), in its padding, so the batch doesn't grow.
|
|
@@ -1158,6 +1175,168 @@ pub struct Txn {
|
|
|
1158
1175
|
pub(crate) snapshot: Snapshot,
|
|
1159
1176
|
pub(crate) reads: Vec<ReadKey>,
|
|
1160
1177
|
pub(crate) batch: WriteBatch,
|
|
1178
|
+
/// A spanning commit's xid (D329 2b, [`tag_xid`](Txn::tag_xid)): passed with the commit,
|
|
1179
|
+
/// not carried on the batch (perf2's N1 on #2076).
|
|
1180
|
+
pub(crate) xid: Option<Box<[u8]>>,
|
|
1181
|
+
}
|
|
1182
|
+
|
|
1183
|
+
/// A read-only transaction's reads, validated and held in memory ([`Txn::hold_reads`],
|
|
1184
|
+
/// ICR 0140 amendment 1). Dropping it releases the hold without asking whether it lasted.
|
|
1185
|
+
#[derive(Debug)]
|
|
1186
|
+
pub struct ReadHold {
|
|
1187
|
+
engine: std::sync::Weak<Inner>,
|
|
1188
|
+
token: u64,
|
|
1189
|
+
shards: Vec<pigeonhole_runtime::ShardId>,
|
|
1190
|
+
done: bool,
|
|
1191
|
+
}
|
|
1192
|
+
|
|
1193
|
+
impl ReadHold {
|
|
1194
|
+
/// Ends the hold, answering whether it was still in place on every shard (`true`), or
|
|
1195
|
+
/// was lost to a close or a recovery (`false`): `false` only ever means lost. It waits
|
|
1196
|
+
/// for the shards' answers, so on a thread that drives a shard (application-owned mode)
|
|
1197
|
+
/// it's refused (`InvalidArgument`) rather than guess: the hold is then released as it's
|
|
1198
|
+
/// dropped, without an answer (perf2's S2 on #2062).
|
|
1199
|
+
pub fn release(mut self) -> crate::Result<bool> {
|
|
1200
|
+
let Some(engine) = self.engine.upgrade() else {
|
|
1201
|
+
self.done = true;
|
|
1202
|
+
return Ok(false);
|
|
1203
|
+
};
|
|
1204
|
+
engine
|
|
1205
|
+
.shared
|
|
1206
|
+
.refuse_blocking_on_driver("releasing a read hold")?;
|
|
1207
|
+
self.done = true;
|
|
1208
|
+
Ok(engine.release_reads(self.token, &self.shards, true))
|
|
1209
|
+
}
|
|
1210
|
+
}
|
|
1211
|
+
|
|
1212
|
+
impl ReadHold {
|
|
1213
|
+
/// [`release`](Self::release) without waiting (#2059): the [`PendingRelease`] resolves
|
|
1214
|
+
/// to whether the hold was still in place on every shard (`false` only ever means lost to
|
|
1215
|
+
/// a close or a recovery). It never blocks, so a thread that drives a shard may call it
|
|
1216
|
+
/// (D88) and poll the answer while it runs the shards.
|
|
1217
|
+
pub fn submit_release(mut self) -> PendingRelease {
|
|
1218
|
+
self.done = true;
|
|
1219
|
+
let Some(engine) = self.engine.upgrade() else {
|
|
1220
|
+
return PendingRelease {
|
|
1221
|
+
held: false,
|
|
1222
|
+
waiting: Vec::new(),
|
|
1223
|
+
};
|
|
1224
|
+
};
|
|
1225
|
+
let (held, waiting) = engine.submit_release_reads(self.token, &self.shards, true);
|
|
1226
|
+
PendingRelease {
|
|
1227
|
+
held,
|
|
1228
|
+
waiting: waiting.into_iter().map(Some).collect(),
|
|
1229
|
+
}
|
|
1230
|
+
}
|
|
1231
|
+
}
|
|
1232
|
+
|
|
1233
|
+
/// A read hold's release in flight ([`ReadHold::submit_release`], #2059): resolves to whether
|
|
1234
|
+
/// the hold was still in place on every shard.
|
|
1235
|
+
#[derive(Debug)]
|
|
1236
|
+
#[must_use = "the release's answer comes from polling it"]
|
|
1237
|
+
pub struct PendingRelease {
|
|
1238
|
+
held: bool,
|
|
1239
|
+
waiting: Vec<Option<pigeonhole_runtime::Waiter<bool>>>,
|
|
1240
|
+
}
|
|
1241
|
+
|
|
1242
|
+
impl std::future::Future for PendingRelease {
|
|
1243
|
+
type Output = bool;
|
|
1244
|
+
|
|
1245
|
+
fn poll(
|
|
1246
|
+
mut self: std::pin::Pin<&mut Self>,
|
|
1247
|
+
cx: &mut std::task::Context<'_>,
|
|
1248
|
+
) -> std::task::Poll<bool> {
|
|
1249
|
+
let this = &mut *self;
|
|
1250
|
+
let mut pending = false;
|
|
1251
|
+
for slot in &mut this.waiting {
|
|
1252
|
+
let Some(rx) = slot else { continue };
|
|
1253
|
+
match std::pin::Pin::new(rx).poll(cx) {
|
|
1254
|
+
std::task::Poll::Ready(answer) => {
|
|
1255
|
+
this.held &= answer == Some(true);
|
|
1256
|
+
*slot = None;
|
|
1257
|
+
}
|
|
1258
|
+
std::task::Poll::Pending => pending = true,
|
|
1259
|
+
}
|
|
1260
|
+
}
|
|
1261
|
+
if pending {
|
|
1262
|
+
std::task::Poll::Pending
|
|
1263
|
+
} else {
|
|
1264
|
+
std::task::Poll::Ready(this.held)
|
|
1265
|
+
}
|
|
1266
|
+
}
|
|
1267
|
+
}
|
|
1268
|
+
|
|
1269
|
+
/// A read hold being taken ([`Txn::submit_hold_reads`], #2059): resolves to the
|
|
1270
|
+
/// [`ReadHold`], or to the refusal [`Txn::hold_reads`] would give. Dropped before it resolves,
|
|
1271
|
+
/// it releases whatever its shards hold.
|
|
1272
|
+
#[derive(Debug)]
|
|
1273
|
+
#[must_use = "the hold comes from polling it, and dropping it releases it"]
|
|
1274
|
+
pub struct PendingHold {
|
|
1275
|
+
engine: std::sync::Weak<Inner>,
|
|
1276
|
+
sub: Option<crate::engine::HoldSubmission>,
|
|
1277
|
+
}
|
|
1278
|
+
|
|
1279
|
+
impl std::future::Future for PendingHold {
|
|
1280
|
+
type Output = crate::Result<ReadHold>;
|
|
1281
|
+
|
|
1282
|
+
fn poll(
|
|
1283
|
+
mut self: std::pin::Pin<&mut Self>,
|
|
1284
|
+
cx: &mut std::task::Context<'_>,
|
|
1285
|
+
) -> std::task::Poll<Self::Output> {
|
|
1286
|
+
let this = &mut *self;
|
|
1287
|
+
let sub = this.sub.as_mut().expect("polled after it resolved");
|
|
1288
|
+
let mut pending = false;
|
|
1289
|
+
let mut answers = Vec::new();
|
|
1290
|
+
for (shard, slot) in &mut sub.waiting {
|
|
1291
|
+
let Some(rx) = slot else { continue };
|
|
1292
|
+
match std::pin::Pin::new(rx).poll(cx) {
|
|
1293
|
+
std::task::Poll::Ready(answer) => {
|
|
1294
|
+
answers.push((*shard, answer));
|
|
1295
|
+
*slot = None;
|
|
1296
|
+
}
|
|
1297
|
+
std::task::Poll::Pending => pending = true,
|
|
1298
|
+
}
|
|
1299
|
+
}
|
|
1300
|
+
for (shard, answer) in answers {
|
|
1301
|
+
sub.answered(shard, answer);
|
|
1302
|
+
}
|
|
1303
|
+
if pending {
|
|
1304
|
+
return std::task::Poll::Pending;
|
|
1305
|
+
}
|
|
1306
|
+
let sub = this.sub.take().expect("taken once");
|
|
1307
|
+
let Some(engine) = this.engine.upgrade() else {
|
|
1308
|
+
// The engine closed meanwhile: whatever was held went with it.
|
|
1309
|
+
return std::task::Poll::Ready(Err(crate::Error::Closed));
|
|
1310
|
+
};
|
|
1311
|
+
std::task::Poll::Ready(engine.finish_hold(sub).map(|(token, shards)| ReadHold {
|
|
1312
|
+
engine: Arc::downgrade(&engine),
|
|
1313
|
+
token,
|
|
1314
|
+
shards,
|
|
1315
|
+
done: false,
|
|
1316
|
+
}))
|
|
1317
|
+
}
|
|
1318
|
+
}
|
|
1319
|
+
|
|
1320
|
+
impl Drop for PendingHold {
|
|
1321
|
+
fn drop(&mut self) {
|
|
1322
|
+
// Unresolved: release on every shard asked, answered or not. A shard's messages run
|
|
1323
|
+
// in order, so a release sent now follows its hold request.
|
|
1324
|
+
if let Some(sub) = self.sub.take()
|
|
1325
|
+
&& let Some(e) = self.engine.upgrade()
|
|
1326
|
+
{
|
|
1327
|
+
e.release_reads(sub.token, &sub.asked(), false);
|
|
1328
|
+
}
|
|
1329
|
+
}
|
|
1330
|
+
}
|
|
1331
|
+
|
|
1332
|
+
impl Drop for ReadHold {
|
|
1333
|
+
fn drop(&mut self) {
|
|
1334
|
+
if !self.done
|
|
1335
|
+
&& let Some(e) = self.engine.upgrade()
|
|
1336
|
+
{
|
|
1337
|
+
e.release_reads(self.token, &self.shards, false);
|
|
1338
|
+
}
|
|
1339
|
+
}
|
|
1161
1340
|
}
|
|
1162
1341
|
|
|
1163
1342
|
impl Txn {
|
|
@@ -1216,7 +1395,7 @@ impl Txn {
|
|
|
1216
1395
|
},
|
|
1217
1396
|
);
|
|
1218
1397
|
}
|
|
1219
|
-
let now = self.engine.shared.
|
|
1398
|
+
let now = self.engine.shared.clock_vfs.now_micros();
|
|
1220
1399
|
self.snapshot.checked(crate::read::read_row_into(
|
|
1221
1400
|
&self.snapshot.view,
|
|
1222
1401
|
self.snapshot.seqno,
|
|
@@ -1264,6 +1443,14 @@ impl Txn {
|
|
|
1264
1443
|
&mut self.batch
|
|
1265
1444
|
}
|
|
1266
1445
|
|
|
1446
|
+
/// Tags the transaction's commit with `xid` (D329 2b): a spanning commit's home share.
|
|
1447
|
+
/// Its records carry it (`XID_BATCH`), and its change-feed events deliver it. 1–255
|
|
1448
|
+
/// bytes; checked when the commit is routed. Hidden.
|
|
1449
|
+
#[doc(hidden)]
|
|
1450
|
+
pub fn tag_xid(&mut self, xid: &[u8]) {
|
|
1451
|
+
self.xid = Some(xid.into());
|
|
1452
|
+
}
|
|
1453
|
+
|
|
1267
1454
|
/// The commit of a transaction that writes nothing (#694, ICR 0060): it needs no
|
|
1268
1455
|
/// validation and no shard round. Its reads all come from one consistent snapshot, so it
|
|
1269
1456
|
/// is serializable at that snapshot whatever committed since, and it never conflicts. It
|
|
@@ -1307,6 +1494,7 @@ impl Txn {
|
|
|
1307
1494
|
snapshot,
|
|
1308
1495
|
reads,
|
|
1309
1496
|
batch,
|
|
1497
|
+
xid,
|
|
1310
1498
|
} = self;
|
|
1311
1499
|
let validate = Validate::new(snapshot, reads);
|
|
1312
1500
|
return Ok(PendingCommit::waiting(
|
|
@@ -1314,7 +1502,7 @@ impl Txn {
|
|
|
1314
1502
|
admit,
|
|
1315
1503
|
Box::new(move || {
|
|
1316
1504
|
engine
|
|
1317
|
-
.
|
|
1505
|
+
.submit_with(batch, durability, Some(validate), None, xid.as_deref())
|
|
1318
1506
|
.map(PendingCommit::from)
|
|
1319
1507
|
}),
|
|
1320
1508
|
));
|
|
@@ -1343,12 +1531,14 @@ impl Txn {
|
|
|
1343
1531
|
snapshot,
|
|
1344
1532
|
reads,
|
|
1345
1533
|
batch,
|
|
1534
|
+
xid,
|
|
1346
1535
|
} = self;
|
|
1347
|
-
engine.
|
|
1536
|
+
engine.submit_with(
|
|
1348
1537
|
batch,
|
|
1349
1538
|
durability,
|
|
1350
1539
|
Some(Validate::new(snapshot, reads)),
|
|
1351
1540
|
None,
|
|
1541
|
+
xid.as_deref(),
|
|
1352
1542
|
)
|
|
1353
1543
|
}
|
|
1354
1544
|
|
|
@@ -1364,17 +1554,133 @@ impl Txn {
|
|
|
1364
1554
|
snapshot,
|
|
1365
1555
|
reads,
|
|
1366
1556
|
batch,
|
|
1557
|
+
xid,
|
|
1367
1558
|
} = self;
|
|
1368
1559
|
engine.shared.refuse_blocking_on_driver("Txn::commit")?;
|
|
1369
1560
|
engine
|
|
1370
|
-
.
|
|
1561
|
+
.submit_with(
|
|
1371
1562
|
batch,
|
|
1372
1563
|
durability,
|
|
1373
1564
|
Some(Validate::new(snapshot, reads)),
|
|
1374
1565
|
None,
|
|
1566
|
+
xid.as_deref(),
|
|
1375
1567
|
)?
|
|
1376
1568
|
.wait()
|
|
1377
1569
|
}
|
|
1570
|
+
|
|
1571
|
+
/// Validates and prepares the transaction as `xid` of an external coordinator (D329,
|
|
1572
|
+
/// ICR 0140): its shares are logged (`durability`, GroupSync at least for the caller's
|
|
1573
|
+
/// atomicity) and hold their rows, and its decision waits for
|
|
1574
|
+
/// [`Engine::decide`](crate::Engine::decide), across a close and a reopen. The answer's
|
|
1575
|
+
/// seqno is the commit's id. A transaction that only read logs its reads with an empty
|
|
1576
|
+
/// batch and holds them the same way (a spanning commit's read-only branch, ICR 0140
|
|
1577
|
+
/// amendment 1); a wholly read-only spanning commit holds its reads in memory instead
|
|
1578
|
+
/// ([`hold_reads`](Self::hold_reads)). `Conflict` as a commit would be;
|
|
1579
|
+
/// `InvalidArgument` for a transaction with no reads and no writes, a value over the
|
|
1580
|
+
/// inline limit, or an `xid` already in doubt here.
|
|
1581
|
+
pub fn prepare(self, xid: &[u8], durability: Durability) -> crate::Result<CommitInfo> {
|
|
1582
|
+
let Txn {
|
|
1583
|
+
engine,
|
|
1584
|
+
snapshot,
|
|
1585
|
+
reads,
|
|
1586
|
+
batch,
|
|
1587
|
+
xid: tag,
|
|
1588
|
+
} = self;
|
|
1589
|
+
refuse_tagged(tag.as_deref())?;
|
|
1590
|
+
engine.shared.refuse_blocking_on_driver("Txn::prepare")?;
|
|
1591
|
+
engine.prepare_external(batch, durability, Some(Validate::new(snapshot, reads)), xid)
|
|
1592
|
+
}
|
|
1593
|
+
|
|
1594
|
+
/// Validates the transaction's reads and holds them in memory (ICR 0140 amendment 1,
|
|
1595
|
+
/// D329 PR 2a): a wholly read-only transaction's part of a spanning commit. Nothing is
|
|
1596
|
+
/// logged and nothing is ever in doubt. While the [`ReadHold`] lives, a write to a held
|
|
1597
|
+
/// row is refused at once (a transaction's prepare with `Conflict`, any other write
|
|
1598
|
+
/// `Busy`), and a tablet change touching one is given up (`Busy`).
|
|
1599
|
+
/// `InvalidArgument` for a transaction with writes or without reads; `Conflict` if a read
|
|
1600
|
+
/// changed since the snapshot or overlaps an undecided write; `Busy` past the in-doubt
|
|
1601
|
+
/// share limit (live holds count) or while a read's tablet moves; `ReadOnly` on a replica
|
|
1602
|
+
/// or a read-only open.
|
|
1603
|
+
pub fn hold_reads(self) -> crate::Result<ReadHold> {
|
|
1604
|
+
let Txn {
|
|
1605
|
+
engine,
|
|
1606
|
+
snapshot,
|
|
1607
|
+
reads,
|
|
1608
|
+
batch,
|
|
1609
|
+
xid: _,
|
|
1610
|
+
} = self;
|
|
1611
|
+
if !batch.is_empty() {
|
|
1612
|
+
return Err(crate::Error::InvalidArgument(
|
|
1613
|
+
"a read hold is for a transaction without writes: prepare it instead".to_owned(),
|
|
1614
|
+
));
|
|
1615
|
+
}
|
|
1616
|
+
engine.shared.refuse_blocking_on_driver("Txn::hold_reads")?;
|
|
1617
|
+
let (token, shards) = engine.hold_reads(Validate::new(snapshot, reads))?;
|
|
1618
|
+
Ok(ReadHold {
|
|
1619
|
+
engine: Arc::downgrade(&engine),
|
|
1620
|
+
token,
|
|
1621
|
+
shards,
|
|
1622
|
+
done: false,
|
|
1623
|
+
})
|
|
1624
|
+
}
|
|
1625
|
+
|
|
1626
|
+
/// [`hold_reads`](Self::hold_reads) without waiting (#2059): the [`PendingHold`] resolves
|
|
1627
|
+
/// to the [`ReadHold`] or to the refusal `hold_reads` gives. It never blocks, so a thread
|
|
1628
|
+
/// that drives a shard may call it (D88) and poll it while it runs the shards. Refused at
|
|
1629
|
+
/// once as `hold_reads` is: `InvalidArgument` for writes or no reads, `ReadOnly` on a
|
|
1630
|
+
/// replica or a read-only open.
|
|
1631
|
+
pub fn submit_hold_reads(self) -> crate::Result<PendingHold> {
|
|
1632
|
+
let Txn {
|
|
1633
|
+
engine,
|
|
1634
|
+
snapshot,
|
|
1635
|
+
reads,
|
|
1636
|
+
batch,
|
|
1637
|
+
xid: _,
|
|
1638
|
+
} = self;
|
|
1639
|
+
if !batch.is_empty() {
|
|
1640
|
+
return Err(crate::Error::InvalidArgument(
|
|
1641
|
+
"a read hold is for a transaction without writes: prepare it instead".to_owned(),
|
|
1642
|
+
));
|
|
1643
|
+
}
|
|
1644
|
+
let sub = engine.submit_hold_reads(Validate::new(snapshot, reads))?;
|
|
1645
|
+
Ok(PendingHold {
|
|
1646
|
+
engine: Arc::downgrade(&engine),
|
|
1647
|
+
sub: Some(sub),
|
|
1648
|
+
})
|
|
1649
|
+
}
|
|
1650
|
+
|
|
1651
|
+
/// [`prepare`](Self::prepare) without waiting (D329): the [`PendingCommit`] resolves as
|
|
1652
|
+
/// `prepare` returns. It never blocks, so a thread that drives a shard may call it (D88).
|
|
1653
|
+
/// A refused prepare's reservation of `xid` goes once its coordination's last handle
|
|
1654
|
+
/// does, shortly after the answer: a prepare of the same xid straight after may meet
|
|
1655
|
+
/// `InvalidArgument` until then (the blocking form releases it with the answer).
|
|
1656
|
+
pub fn submit_prepare(
|
|
1657
|
+
self,
|
|
1658
|
+
xid: &[u8],
|
|
1659
|
+
durability: Durability,
|
|
1660
|
+
) -> crate::Result<PendingCommit> {
|
|
1661
|
+
let Txn {
|
|
1662
|
+
engine,
|
|
1663
|
+
snapshot,
|
|
1664
|
+
reads,
|
|
1665
|
+
batch,
|
|
1666
|
+
xid: tag,
|
|
1667
|
+
} = self;
|
|
1668
|
+
refuse_tagged(tag.as_deref())?;
|
|
1669
|
+
engine
|
|
1670
|
+
.submit_prepare_external(batch, durability, Some(Validate::new(snapshot, reads)), xid)
|
|
1671
|
+
.map(|(sub, _)| PendingCommit::from(sub))
|
|
1672
|
+
}
|
|
1673
|
+
}
|
|
1674
|
+
|
|
1675
|
+
/// An External Prepare names its xid in its record: a transaction tagged for a spanning
|
|
1676
|
+
/// commit's home share ([`Txn::tag_xid`]) has no place there (feed1248's point 6 on 2b).
|
|
1677
|
+
fn refuse_tagged(tag: Option<&[u8]>) -> crate::Result<()> {
|
|
1678
|
+
match tag {
|
|
1679
|
+
Some(_) => Err(crate::Error::InvalidArgument(
|
|
1680
|
+
"an external prepare can't carry an xid tag: its share names its xid".to_owned(),
|
|
1681
|
+
)),
|
|
1682
|
+
None => Ok(()),
|
|
1683
|
+
}
|
|
1378
1684
|
}
|
|
1379
1685
|
|
|
1380
1686
|
// ---- caller-runs (#1176) -----------------------------------------------------------------
|
data/vendor/format/Cargo.toml
CHANGED
data/vendor/format/src/shm.rs
CHANGED
|
@@ -43,6 +43,11 @@ pub const ROW_EPOCH_HASH_XXH3: u32 = 1;
|
|
|
43
43
|
/// [`header::ROW_EPOCH_FLAGS`] bit: the writer raises the slots (its row cache is on). A
|
|
44
44
|
/// reader caches only when it is set.
|
|
45
45
|
pub const ROW_EPOCHS_MAINTAINED: u32 = 1;
|
|
46
|
+
/// [`header::FEED_FLAGS`] bit (D315 amendment, #1869): the session's change-feed sidecar
|
|
47
|
+
/// appends stopped (an append or a sync failed), so no later catalog change can get its
|
|
48
|
+
/// `Catalog` entry. A reader process's feed of every table expires on it, as one in the
|
|
49
|
+
/// writer's process does.
|
|
50
|
+
pub const FEED_APPENDS_STOPPED: u32 = 1;
|
|
46
51
|
|
|
47
52
|
/// The hash that picks a row's row-epoch slot (FORMAT §11.7, D281):
|
|
48
53
|
/// `xxh3_64_with_seed(seed + table, row)`, the seed plus the table id wrapping in `u64`; the
|
|
@@ -132,6 +137,11 @@ pub mod header {
|
|
|
132
137
|
/// change feed's frontier stays below it; `u64::MAX` when none. Stored as the writer's
|
|
133
138
|
/// written watermark is: the lowest seqno held.
|
|
134
139
|
pub const CATALOG_HOLD: usize = 200;
|
|
140
|
+
/// `u32` atomic (D315 amendment, #1869; layout version 9, from the zeroed reserved area):
|
|
141
|
+
/// change-feed flags, 0 at init. Bit 0 [`FEED_APPENDS_STOPPED`](super::FEED_APPENDS_STOPPED),
|
|
142
|
+
/// set once with `fetch_or` (Release) and never cleared within a generation; other bits
|
|
143
|
+
/// reserved, 0. A build that doesn't know it never reads it.
|
|
144
|
+
pub const FEED_FLAGS: usize = 208;
|
|
135
145
|
}
|
|
136
146
|
|
|
137
147
|
/// Byte offsets within a watermark line.
|
|
@@ -125,8 +125,15 @@ impl Features {
|
|
|
125
125
|
/// ([`RO_COMPAT_REPLICA`](crate::manifest::RO_COMPAT_REPLICA), D315 PR 3).
|
|
126
126
|
pub const KNOWN_RO_COMPAT: u64 = crate::manifest::RO_COMPAT_REPLICA;
|
|
127
127
|
/// The `incompat` bits this build knows: bit 0, the Min, Max and Hll family kinds
|
|
128
|
-
/// ([`INCOMPAT_AGGREGATES`](crate::manifest::INCOMPAT_AGGREGATES), D294)
|
|
129
|
-
|
|
128
|
+
/// ([`INCOMPAT_AGGREGATES`](crate::manifest::INCOMPAT_AGGREGATES), D294); bit 1, WAL pad
|
|
129
|
+
/// fragments ([`INCOMPAT_WAL_PAD`](crate::wal::INCOMPAT_WAL_PAD), D327); bit 2,
|
|
130
|
+
/// externally prepared transactions in the WAL
|
|
131
|
+
/// ([`INCOMPAT_EXTERNAL_PREPARE`](crate::wal::INCOMPAT_EXTERNAL_PREPARE), D329); bit 3,
|
|
132
|
+
/// feed-silent batches ([`INCOMPAT_FEED_SILENT`](crate::wal::INCOMPAT_FEED_SILENT), D331).
|
|
133
|
+
pub const KNOWN_INCOMPAT: u64 = crate::manifest::INCOMPAT_AGGREGATES
|
|
134
|
+
| crate::wal::INCOMPAT_WAL_PAD
|
|
135
|
+
| crate::wal::INCOMPAT_EXTERNAL_PREPARE
|
|
136
|
+
| crate::wal::INCOMPAT_FEED_SILENT;
|
|
130
137
|
|
|
131
138
|
/// `incompat` bits this build does not know.
|
|
132
139
|
pub fn unknown_incompat(&self) -> u64 {
|