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

[5kItK998] Fix bug in triggers #513

Merged
merged 3 commits into from
Nov 7, 2023
Merged

[5kItK998] Fix bug in triggers #513

merged 3 commits into from
Nov 7, 2023

Conversation

loveleif
Copy link
Contributor

@loveleif loveleif commented Oct 16, 2023

Fix a bug where active triggers are not executed.

@loveleif loveleif added the bug Something isn't working label Oct 16, 2023
@loveleif loveleif changed the title Fix bug in triggers [5kItK998] Fix bug in triggers Oct 16, 2023
@loveleif loveleif force-pushed the fix-missing-trigger branch from 744cfc7 to a0978bd Compare October 16, 2023 07:26
@@ -95,28 +98,31 @@ public void checkEnabled() {
}

private void updateCache() {
activeTriggers.clear();
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was the problem, triggers were not run between this call and adding them all back later on.

private final Log log;
private final GraphDatabaseService db;
private final DatabaseManagementService databaseManagementService;
private final ApocConfig apocConfig;
private final Pools pools;
private final JobScheduler jobScheduler;

private long lastUpdate;
private volatile long lastUpdate;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why does this need to be thread safe?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It can be set and read from multiple different threads at the same time (from scheduled thread and from procedures calling into here).

Copy link
Collaborator

@ncordon ncordon left a comment

Choose a reason for hiding this comment

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

The traceability doesn't matter for merging the pr but the LICENSES need to be up to date and they depend on the neo4j version been run. You'll have to download the latest neo4j SNAPSHOT and do ./gradlew generateLicensesFiles

@loveleif loveleif force-pushed the fix-missing-trigger branch 2 times, most recently from 6753951 to d6ff118 Compare November 7, 2023 15:10
Fix a bug where active triggers are not executed for all transactions.
@loveleif loveleif force-pushed the fix-missing-trigger branch from 9b20f04 to 0fa5810 Compare November 7, 2023 22:31
@loveleif loveleif merged commit bd2b629 into dev Nov 7, 2023
12 checks passed
@loveleif loveleif deleted the fix-missing-trigger branch November 7, 2023 23:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants