Skip to content

FullBackupFormat's window path pairs a t0 schema.json with a live .ts.sealed listing, the same way the HA snapshot ship did before #7671 #7705

Closed

Description

@robfrank

Summary

#7671 fixed the HA snapshot ship: on the point-in-time-window path it now lists the TimeSeries sealed stores
with the window, inside one db.executeInReadLock(...) frame, so the archived .ts.sealed set is the same
observation as the schema.json the window captured at t0. FullBackupFormat has the identical shape and was
deliberately left out of that PR, because the backup carries an explicit, different decision about a vanished
store and changing it belongs in its own issue.

Two separate gaps, on the same path.

1. The set is not the t0 set. backupFromSnapshot opens the window with no database lock at all:

// integration/src/main/java/com/arcadedb/integration/backup/format/FullBackupFormat.java:225
try (final PageSnapshot snapshot = database.getPageManager().openSnapshot(database)) {
  for (final PageSnapshot.SnapshotConfigFile config : snapshot.getConfigurationFiles())
    origSize += compressEntry(archive, config.fileName(), config.lastModified(), config.newInputStream());
  origSize += compressSealedStores(archive);   // :283 lists the directory LIVE

and its own javadoc says as much: "The sealed stores are still read straight off the filesystem, and never were
covered by the read lock". A DROP TYPE of a TIMESERIES type landing between t0 and that listing therefore
produces an archive whose schema.json (captured at t0) declares the type while its sealed segments are absent -
the #6356 / #6839 "type whose sealed store fails to load" state, in a backup rather than on a follower.

2. A store that goes away between the listing and the read is swallowed. compressSealedStores catches
FileNotFoundException and logs "disappeared while being archived, skipped" (:284-296). That is a deliberate
decision, argued in the comment there: a repair of a type whose engine never loaded takes no shard lock (#7475),
an operator can always move a file, and "which is not worth failing a backup over". The ship reached the opposite
conclusion in #7671 - it fails, because the follower retries and the retry is coherent - and a backup has no
retry, so the trade-off genuinely is different. It still means a FULL BACKUP can report success over an archive
that contradicts its own schema.json, with nothing in the archive recording that it does.

Where

Suggested fix

Gap 1 is cheap and carries no policy question: list the sealed stores inside the same read-locked frame that opens
the window, exactly as the ship now does, and hand the captured set to compressSealedStores. The lock is held for
the barrier plus one File.listFiles, not for the backup, so the availability #6114 bought is untouched.

Gap 2 is a decision, not a bug fix, and the options are worth stating rather than assuming:

  • keep skipping, but record the skip in the archive (a manifest-style note) so a restore can say what it does not have;
  • fail the backup, matching the ship;
  • keep today's behaviour and say so in the FULL BACKUP result, so the operator learns it from the tool rather than from a restore.

Scope

Low severity and the same medium confidence #7671 carried: a DROP TYPE concurrent with a backup is rare, and the
backup is a point-in-time artifact nobody is replaying into a live cluster. What makes it worth filing is that
#7671 corrected a stated rationale on the ship, and the same rationale is still standing, unqualified, in
backupFromSnapshot's javadoc.

Dedup: #7280 added the sealed stores to the backup. #7337 (closed) is the same file set against compaction, #7475
(open) against a repair. #7671 is the ship's version of this. None of them names the backup's read lock.

Activity

  1. added
    concurrency
    timeseries
    backup-restore
    on Sep 16, 2026
  2. added this to the 26.10.1 milestone on Sep 16, 2026
  3. added
    in progress
    on Sep 16, 2026
  4. self-assigned this
    on Sep 16, 2026
  5. added 2 commits that reference this issue on Sep 16, 2026
  6. lvca commented on Sep 16, 2026

    @lvca
    Member

    Fixed in #7746, released in 26.10.1.

    A FULL BACKUP captures the schema at a single point in time, but it used to list the TimeSeries data files a moment later. If a TIMESERIES type was dropped in between, the archive ended up declaring a type whose data was missing, and the backup still reported success. Both are now captured together, so the archive is always self-consistent.

    Behaviour change worth knowing about: if a TimeSeries data file cannot be read while the backup is running, the backup now fails with an error naming the file instead of skipping it and reporting success. This is deliberate. An archive that quietly omits data its own schema declares looks fine until you try to restore it, which is the worst possible moment to find out. A failed backup is visible and a re-run is coherent, so nothing is lost by being told straight away.

    The same applies if the database directory cannot be listed at all: that is now an error rather than being treated as "this database has no TimeSeries data".

    Note that the extra safety costs nothing in availability. The lock is held only long enough to take the snapshot and list the files, not for the duration of the backup, so schema changes still run normally alongside a backup.

    While fixing this we also found that the old "file disappeared, skipped" message could never actually appear: an earlier check had already discarded the file silently.

    ❤️ Thanks for helping make ArcadeDB better! ArcadeDB is free and open source, sustained by its community. If it's useful to you or your company, please consider becoming a sponsor to keep development going.

  7. removed
    in progress
    on Sep 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

backup-restorebugconcurrencytimeseries

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions