[adapters] Add the set of running syncs to CheckpointSyncStatus. - #6930
[adapters] Add the set of running syncs to CheckpointSyncStatus.#6930blp wants to merge 1 commit into
Conversation
|
Ran locally:
Uncovered cases worth adding, in rough priority order: (a) |
921ef20 to
9667106
Compare
| uuid = self.pipeline.sync_checkpoint() | ||
| self.assertEqual(str(uuid), str(chk_uuid)) | ||
|
|
||
| status, _ = self._drain_sync(uuid) |
There was a problem hiding this comment.
saw_running is discarded here, so the happy-path test never asserts that running is ever non-empty — it only checks the invariant "visible in running or in a terminal slot", which an implementation that never populates running at all would also satisfy (success gets set either way). Combined with the race in test_sync_status_running_after_failure, no test reliably exercises the feature this PR adds. Deleting CheckpointSyncGuard::try_new's insert would still leave both integration tests green.
|
Reviewed against What I ran
Gates
Uncovered cases I found
|
swanandx
left a comment
There was a problem hiding this comment.
i didn't click approve in case we decide to make those changes mentioned in comments, PR looks good to me otherwise
69c0524 to
81d51d0
Compare
|
Ran Cases the tests do not reach:
Two smaller notes, no action needed if intentional: (1) OpenAPI gives |
CheckpointSyncStatus reports the status of checkpoint sync activity, but it didn't give enough information to tell what syncs were currently in progress. This adds a new field `running` to track that. Signed-off-by: Ben Pfaff <blp@feldera.com>
81d51d0 to
c69c33f
Compare
|
I think I've fixed all the substantive feedback here. |
|
you might need to rebase on main and regenerate openapi.json for pre merge queue tasks to pass |
swanandx
left a comment
There was a problem hiding this comment.
don't have anything blocking, just code organization nitpick :P
thanks for the PR! 🚀
| fn sync_checkpoint(state: WebData<ServerState>, controller: Controller, uuid: Uuid) { | ||
| /// Tracks state for an ongoing checkpoint sync. | ||
| struct CheckpointSyncGuard { | ||
| state: WebData<ServerState>, | ||
| uuid: Option<Uuid>, | ||
| } | ||
|
|
There was a problem hiding this comment.
why we just moved the struct inside this method?
by inline implementation i meant getting rid of CheckpointSyncGuard
but as you replied in other comment, i'm fine either way, whether we keep it or inline implementation.
but putting it under fn defination doesn't make much sense to me
CheckpointSyncStatus reports the status of checkpoint sync activity, but it didn't give enough information to tell what syncs were currently in progress. This adds a new field
runningto track that.Describe Manual Test Plan
This is just unit tests so far.
Checklist
Breaking Changes?
No, it's careful to avoid them.