Skip to content

Chunk and decouple post-delete applyWrites batch #48

@pfefferle

Description

@pfefferle

Publisher::delete_post() (trash path) and delete_post_by_tids() (permanent-delete path, since #32) submit one atomic applyWrites batch containing the post, the document, and one delete per outbound comment reply. The batch size scales with thread length, has no chunking, and no fallback. On a popular post:

  • PDS write-count or payload limits may be exceeded.
  • Atomic failure under load means no partial-progress recovery.
  • Root cleanup is blocked by a single oversized comment cascade.

Matters more on permanent-delete than trash, since trash can be retried by re-trashing.

Suggested shape

  • Chunk comment deletions to a bounded batch size (e.g., 25–50 writes) and submit sequentially.
  • Decouple post + document deletes from the comment-reply deletes so root cleanup is not blocked by an oversized comment cascade.
  • If the target PDS documents a write-count limit, enforce it and add a test for the overflow path.

Origin

Codex adversarial review; deferred from #32.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions