Skip to content

Ensure concurrent relationship batches use unique transacations. - #6821

Closed
tychedelia wants to merge 1 commit into
payloadcms:mainfrom
tychedelia:6800-batch-load-race
Closed

tychedelia wants to merge 1 commit into
payloadcms:mainfrom
tychedelia:6800-batch-load-race

Conversation

@tychedelia

@tychedelia tychedelia commented Jun 17, 2024 •

Copy link
Copy Markdown

Description

Due to insufficient isolation between concurrent fetches of relationships, an existing transaction id from a transaction opened by find inside the data loader would sometimes leak and be re-used as a batch key by further fetches of the same relationship. Infrequently, if the first transaction committed before the second, it would delete the transactionID from the request object causing the document populaton to fail and return null.

Fixes #6800

  • I have read and understand the CONTRIBUTING.md document in this repository.

Type of change

  • Chore (non-breaking change which does not add functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Change to the templates directory (does not affect core functionality)
  • Change to the examples directory (does not affect core functionality)
  • This change requires a documentation update

Checklist:

  • I have added tests that prove my fix is effective or that my feature works
  • Existing test suite passes locally with my changes
  • I have made corresponding changes to the documentation

Due to insufficient isolation between concurrent fetches of relationships,
an existing transaction id from a transaction opened by `find` inside the
data loader would sometimes leak and be re-used as a batch key by further
fetches of the same relationship. Infrequently, if the first transaction
committed before the second, it would delete the transactionID from the
request object causing the document populaton to fail and return null.

Fixes payloadcms#6800
@tychedelia

Copy link
Copy Markdown
Author

Seems like this has been superseded elsewhere.

@tychedelia tychedelia closed this Jun 20, 2024
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

Successfully merging this pull request may close these issues.

GraphQL returns inconsistent results for relationships

1 participant