Skip to content

Sync: upsertApiCommunicator called per cascade level — coalesce to a single push per sync #2201

@RodriSanchez1

Description

@RodriSanchez1

Part of #2195.

Problem

updateApiObjectsNoChild (src/components/Board/Board.actions.js:1034) unconditionally calls upsertApiCommunicator(comm) after every board create. Because the function is also called recursively from updateApiMarkedBoards (:1086), a single user action that triggers a deep cascade (e.g. creating a board with N local children referenced by N parent boards) can produce N+1 PUT requests to the communicator endpoint within one sync cycle.

The doc already notes this in §14: "Communicator always persisted".

Impact

Proposed direction

Acceptance criteria

  • A cascade that creates K boards results in at most one upsertApiCommunicator call per affected communicator per sync cycle.
  • No regression in cross-device communicator consistency.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    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