Skip to content

Conversation

@hermanschaaf
Copy link
Member

This fixes a data race in the scheduler that caused some child resources to be missed.

The implementation is now correct, but it could be made more efficient. The point is that we have to submit the sentinel indicating the start of the resolver before submitting the job, otherwise the job might send a "finished" signal before the "start" signal is sent, causing the counts to be equal before all resources have actually been processed.

exc_info=True,
)
finally:
res.put(TableResolverStarted(count=table_resolvers_started))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was always confused by this line

Copy link
Contributor

@yevgenypats yevgenypats left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice

@yevgenypats yevgenypats added the automerge Add to automerge PRs once requirements are met label Aug 1, 2023
@kodiakhq kodiakhq bot merged commit 17fee27 into main Aug 1, 2023
@kodiakhq kodiakhq bot deleted the fix-race branch August 1, 2023 16:50
@cq-bot cq-bot mentioned this pull request Aug 1, 2023
kodiakhq bot pushed a commit that referenced this pull request Aug 2, 2023
🤖 I have created a release *beep* *boop*
---


## [0.0.9](v0.0.8...v0.0.9) (2023-08-02)


### Features

* Add override_columns to openapi transformer ([#22](#22)) ([a53bb0e](a53bb0e))
* Wire logging with cli flags ([#26](#26)) ([106781b](106781b))


### Bug Fixes

* Add better logging for scheduler ([#24](#24)) ([505f94b](505f94b))
* Add more command-line args, use standard logging ([#29](#29)) ([5d52af9](5d52af9))
* Emit migrate messages for child relations ([#21](#21)) ([536e163](536e163))
* Fix column resolver resource set ([#23](#23)) ([9936ced](9936ced))
* Fix exception logging ([#18](#18)) ([2a5996b](2a5996b))
* Fix extension type definitions ([#20](#20)) ([146c549](146c549))
* Fix JSON type handling ([#19](#19)) ([c0cdf55](c0cdf55))
* Fix race in scheduler ([#25](#25)) ([17fee27](17fee27))
* Log error on table resolver exception/error ([#16](#16)) ([a1b07e8](a1b07e8))

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automerge Add to automerge PRs once requirements are met

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants