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

Fix loadDerived not taking entity cache into consideration when loading derived entities #4799

Merged

Conversation

incrypto32
Copy link
Member

Closes #4727

@incrypto32 incrypto32 requested a review from lutter August 9, 2023 13:15
graph/src/components/store/entity_cache.rs Show resolved Hide resolved
graph/src/components/store/entity_cache.rs Outdated Show resolved Hide resolved
graph/src/components/store/entity_cache.rs Outdated Show resolved Hide resolved
graph/src/components/store/entity_cache.rs Outdated Show resolved Hide resolved
graph/src/components/store/entity_cache.rs Outdated Show resolved Hide resolved
@incrypto32 incrypto32 force-pushed the incrypto32/fix-same-transaction-dervide-loaders-issue branch 2 times, most recently from b9cd862 to 259cda0 Compare August 10, 2023 13:24
@incrypto32 incrypto32 requested a review from lutter August 10, 2023 13:44
@incrypto32 incrypto32 force-pushed the incrypto32/fix-same-transaction-dervide-loaders-issue branch 2 times, most recently from 2325994 to 0371ee2 Compare August 10, 2023 14:25
@incrypto32 incrypto32 force-pushed the incrypto32/fix-same-transaction-dervide-loaders-issue branch from 0371ee2 to 9c41c38 Compare August 10, 2023 15:21
graph/src/components/store/entity_cache.rs Show resolved Hide resolved
graph/src/components/store/entity_cache.rs Show resolved Hide resolved
graph/src/components/store/entity_cache.rs Outdated Show resolved Hide resolved
graph/src/components/store/entity_cache.rs Outdated Show resolved Hide resolved
@incrypto32 incrypto32 force-pushed the incrypto32/fix-same-transaction-dervide-loaders-issue branch from 817d61f to f70ee0e Compare August 11, 2023 03:40
@incrypto32 incrypto32 force-pushed the incrypto32/fix-same-transaction-dervide-loaders-issue branch from f70ee0e to 626890b Compare August 11, 2023 03:48
@incrypto32 incrypto32 force-pushed the incrypto32/fix-same-transaction-dervide-loaders-issue branch from f248968 to c7bce0d Compare August 11, 2023 16:00
@incrypto32 incrypto32 requested a review from lutter August 11, 2023 17:46

for (key, entity) in entity_map.iter() {
// Only insert to the cache if it's not already there
// This is to avoid overwriting updates
Copy link
Collaborator

Choose a reason for hiding this comment

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

Since self.current only contains entities that have already been written to the store, there's no danger of clobbering an update. It's still good to add those entities to self.current, it's just that the comment is misleading.

Copy link
Member Author

Choose a reason for hiding this comment

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

in that case should we just insert it without checking ? Is there a reason to keep the check?

graph/src/components/store/entity_cache.rs Show resolved Hide resolved
@incrypto32
Copy link
Member Author

@lutter Any idea why the runner tests are failing with PoisonError ? it failed every single time for this PR. But works fine when i run locally

@incrypto32
Copy link
Member Author

The runners test issue was a yarn workspace issue. fixed it

@incrypto32 incrypto32 merged commit c350e4f into master Aug 14, 2023
6 checks passed
@incrypto32 incrypto32 deleted the incrypto32/fix-same-transaction-dervide-loaders-issue branch August 14, 2023 07:56
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.

[Bug] creating related entity and loading in the same transaction not working
2 participants