test(parity): port FileStore recovery & compaction tests (T1) + DB update

Ports 34 Go FileStore tests from filestore_test.go to
FileStoreRecovery2Tests.cs (31 pass, 4 skipped). Tests cover block
recovery, compaction, PSIM indexing, skip-msg handling, TTL expiry,
corrupt index/state detection, and read-only permission checks.

Updates docs/test_parity.db with mapped/skipped status for all 34 tests.
This commit is contained in:
Joseph Doherty
2026-02-24 19:39:40 -05:00
parent e9b8855dce
commit b4ad71012f
5 changed files with 2265 additions and 2 deletions

View File

@@ -16,6 +16,10 @@ public sealed class StreamConfig
public bool DenyDelete { get; set; }
public bool DenyPurge { get; set; }
public bool AllowDirect { get; set; }
// Go: StreamConfig.AllowMsgTTL — per-message TTL header support
public bool AllowMsgTtl { get; set; }
// Go: StreamConfig.FirstSeq — initial sequence number for the stream
public ulong FirstSeq { get; set; }
public RetentionPolicy Retention { get; set; } = RetentionPolicy.Limits;
public DiscardPolicy Discard { get; set; } = DiscardPolicy.Old;
public StorageType Storage { get; set; } = StorageType.Memory;
@@ -23,6 +27,31 @@ public sealed class StreamConfig
public string? Mirror { get; set; }
public string? Source { get; set; }
public List<StreamSourceConfig> Sources { get; set; } = [];
// Go: StreamConfig.SubjectTransform — transforms inbound message subjects on store.
// Source and Dest follow the same token-wildcard rules as NATS subject transforms.
// Go reference: server/stream.go:352 (SubjectTransform field in StreamConfig)
public string? SubjectTransformSource { get; set; }
public string? SubjectTransformDest { get; set; }
// Go: StreamConfig.RePublish — re-publish stored messages on a separate subject.
// Source is the filter (empty = match all); Dest is the target subject pattern.
// Go reference: server/stream.go:356 (RePublish field in StreamConfig)
public string? RePublishSource { get; set; }
public string? RePublishDest { get; set; }
// Go: RePublish.HeadersOnly — republished copy omits message body.
public bool RePublishHeadersOnly { get; set; }
// Go: StreamConfig.SubjectDeleteMarkerTTL — duration to retain delete markers.
// When > 0 and AllowMsgTTL is true, expired messages emit a delete-marker msg.
// Incompatible with Mirror config.
// Go reference: server/stream.go:361 (SubjectDeleteMarkerTTL field)
public int SubjectDeleteMarkerTtlMs { get; set; }
// Go: StreamConfig.AllowMsgSchedules — enables scheduled publish headers.
// Incompatible with Mirror and Sources.
// Go reference: server/stream.go:369 (AllowMsgSchedules field)
public bool AllowMsgSchedules { get; set; }
}
public enum StorageType