Closed dhardy closed 8 years ago
Closing for now: PartitionIO optionally stores the PartId, Partition requires a PartId on creation.
Possibly Partition should allow creation without the PartId and discover later, but having it like this before was a nuisance.
Currently,
Partition
remembers its number (required)Repo
uses these numbers in its index (sensible)PartitionIO
does not know about these numbers, even though they may be in the file namesPartitionIO
and a numberPartition
discover the number from the file contents (where it probably should be anyway)This is historical: it was not planned that the numbers would be found in the file names, and single-partition usage was implemented before multi-partition functionality. This could still be changed. But should it?
Proposals:
PartitionIO
and just verify when loading; in this case Partition::open() doesn't need the number passed any more