Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Concurrent access for getOffset() #174

Open
vaibhav-yb opened this issue Mar 6, 2023 · 0 comments
Open

Concurrent access for getOffset() #174

vaibhav-yb opened this issue Mar 6, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@vaibhav-yb
Copy link
Collaborator

In the current implementation, the YugabyteDBChangeRecordEmitter calls the getOffset() function to pass the YugabyteDBOffsetContext - the getOffset() function simply returns the object. Now consider the following situation:

  1. getOffset() returns the YugabyteDBOffsetContext i.e. offsetContext
  2. A source record is formed by using the map from the above object i.e. offsetContext.getValueFromInternalMap(tabletId) - note that this method name is for reference only.

The question is, can there be a scenario where some other thread or method can modify the value of the internal map between the step 1 and step 2 possibly indicating some race condition?

@vaibhav-yb vaibhav-yb added the enhancement New feature or request label Mar 6, 2023
@vaibhav-yb vaibhav-yb self-assigned this Mar 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant