#3833 closed defect (fixed)

Knowledge of mutable and immutable share file formats is spread across the codebase

Reported by: exarkun Owned by: exarkun
Priority: normal Milestone: undecided
Component: unknown Version: n/a
Keywords: Cc:
Launchpad Bug:

Description

The mutable and immutable container formats each start with a unique header. This header is sometimes inspected to determine if a particular file probably contains a mutable container, an immutable container, or something unrelated to Tahoe.

This inspection is done by spreading knowledge of the header format across several parts of the codebase. For example: the test suite searches for a specific byte sequence to identify immutable containers; the debug command does likewise, and there are similar examples of logic inspecting the mutable container's header.

This is undesirable because duplication of logic allows for divergences to arise and increases the maintenance burden. It also increases the local code complexity at each of these sites by involving specific detailed information about file formats where the code might otherwise be independent of those format details.

Change History (1)

comment:1 Changed at 2021-11-03T17:05:14Z by GitHub <noreply@…>

  • Resolution set to fixed
  • Status changed from new to closed

In 8fbbc91/trunk:

Merge pull request #1152 from tahoe-lafs/3833.container-format-abstraction

Container header format abstractions

Fixes: ticket:3833

Note: See TracTickets for help on using tickets.