fix(core): Back up and restore FST buckets again

Since 27a1b2b ("chore(core): Flatten FST store code"), the bucket loop in
`FstStorePool::dump_action` checked the type and name of the collection
entry instead of the bucket entry. As a collection is a directory, every
bucket was skipped: `TRIGGER backup` answered `OK` but wrote no FST, and
`TRIGGER restore` restored none.

Add a test which backs up a consolidated FST and restores it.
This commit is contained in:
dualfroz committed 2026-10-03 17:33:05 +02:00
1 parent 322b72ed1f
commit 73692bcfdb
2 files changed
+48 -2

No files matched your search

+2 -2
View File
@@ -88,7 +88,7 @@ impl FstStorePool {
let bucket_entry = bucket_entry?;
// Actual bucket found?
let file_type = collection_entry.file_type()?;
let file_type = bucket_entry.file_type()?;
if !file_type.is_file() {
tracing::trace!(
?file_type,
@@ -97,7 +97,7 @@ impl FstStorePool {
continue 'buckets;
}
let file_name = collection_entry.file_name();
let file_name = bucket_entry.file_name();
let Some(bucket_file_name) = file_name.to_str() else {
tracing::warn!(
file_name_bytes = ?file_name.as_encoded_bytes(),