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

Multithreading with MultiDBClient and the XTypes::Registry #6

Open
pierrewillenbrockdfki opened this issue Apr 8, 2024 · 0 comments

Comments

@pierrewillenbrockdfki
Copy link
Member

When using MultiDBClient in a multithreaded program, the Information stored behind XTypePtrs can be observed to change during MultiDBClient::find.

This is due to the Servers needing to provide a list of XTypePtrs, thus have to try to fill their version of the data for an URI during ::find.

This only happens when the same URI is reachable by multiple Servers.

Sequence of events:

  1. MultiDBClient::find begins
  2. MultiDBClient::find queries first Server having a version of the conflicting URI
  3. All threads see the data behind the XTypePtr for the conflicting URI change to the version of the first(lower priority) server. This data is incorrect.
  4. MultiDBClient::find queries second Server having a version of the conflicting URI
  5. All threads see the data behind the XTypePtr for the conflicting URI change to the version of the second(higher priority) server
  6. ...
  7. MultiDBClient::find ends

For now, this is a theoretical issue. Access currently is not multithreaded.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant