Skip to content

Audit site-replication source timestamps, tombstones, and per-site counters #77

Description

@Vonng

Context

The #75 CORS repair intentionally preserves source timestamps and deletion tombstones only for per-bucket CORS. Adversarial review confirmed that neighboring site-replication handlers and status counters use similar inherited patterns, but their metadata semantics are not identical and should not be changed without reproductions.

Audit questions

For policy, tags, SSE, quota, versioning, Object Lock, and other bucket metadata types:

  • Does peer apply persist the source UpdatedAt, or replace it with local arrival time through BucketMetadataSys.Update/Delete?
  • After DELETE, can the relevant getter still expose the tombstone timestamp, or can an older PUT resurrect the deleted state?
  • Does SiteReplicationMetaInfo export timestamps when the live payload is nil?
  • Can heal choose a default CreatedAt state as latest before applying its creation-time guard?
  • Do per-site totals use the current site's field, or a cumulative count from earlier sites in the loop?
  • Are delayed, reordered, duplicate, and missed events observable and diagnosable?

Known evidence to include

  • Several existing totals near TotalCorsConfigCount use cumulative counters while iterating sites; an asymmetric configuration can be attributed to the wrong site.
  • Several peer handlers call ordinary Update/Delete, which generate local time rather than preserving the event time.
  • If a peer's bucket creation time is later than an incoming metadata event, the event is ignored but the RPC can still report success; status may retain a mismatch without an explanatory log.

Deliverables

  • Add failing tests before changing each metadata type.
  • Record a behavior matrix by metadata type; do not assume identical delete semantics.
  • Open focused repair issues/PRs for reproduced defects.
  • Introduce a shared helper only after at least two types demonstrably require the same state transition and error contract.
  • Keep release, documentation, and compatibility effects explicit for every resulting repair.

This is an evidence-gathering task, not authorization for a broad replication rewrite.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status
    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions