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

[6R2yEhGU] No procedure with name xxxx registered for this database instance #3800

Merged
merged 2 commits into from
Dec 19, 2023

Conversation

vga91
Copy link
Contributor

@vga91 vga91 commented Oct 19, 2023

Steps to reproduce

Create multiple procs/overrides with low refresh config value (e.g.: apoc.custom.procedures.refresh=10)

CALL apoc.custom.declareProcedure('<procName>() :: (answer::INT)', $query)
CALL custom.<procName>

Why

Sometimes it can happen that during the refresh the system database has discrepancies with the cache (i.e. registeredProcedureSignatures and registeredUserFunctionSignatures) and therefore some procedures/functions are mistakenly de-registered.

  • Added synchronized in restoreProceduresAndFunctions, storeFunction and storeProcedure methods

@@ -55,7 +58,7 @@
public class CypherProceduresStorageTest {
private final static String QUERY_CREATE = "RETURN $input1 + $input2 as answer";
private final static String QUERY_OVERWRITE = "RETURN $input1 + $input2 + 123 as answer";
private final int refreshTime = 3000;
private final int refreshTime = 50;
Copy link
Collaborator

Choose a reason for hiding this comment

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

why this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

To make the *WorksCorrectlyWithoutConflicts() tests more deterministic, since the bug occurs when calling a custom procedure/function during the refresh phase.
With a high refreshTime the tests are almost always green even without the synchronized clauses.

@vga91 vga91 force-pushed the issue-6R2yEhGU-4.4 branch from 65753c8 to 21ef567 Compare December 19, 2023 14:10
@vga91 vga91 force-pushed the issue-6R2yEhGU-4.4 branch from 21ef567 to ad0d62e Compare December 19, 2023 14:11
@vga91 vga91 merged commit eda49ee into 4.4 Dec 19, 2023
14 checks passed
@vga91 vga91 deleted the issue-6R2yEhGU-4.4 branch December 19, 2023 15:12
vga91 added a commit that referenced this pull request Dec 19, 2023
…nstance (#3800)

* [6R2yEhGU] No procedure with name xxxx registered for this database instance

* [6R2yEhGU] added testCallEventually
vga91 added a commit to vga91/neo4j-apoc-procedures that referenced this pull request Dec 19, 2023
…nstance (neo4j-contrib#3800)

* [6R2yEhGU] No procedure with name xxxx registered for this database instance

* [6R2yEhGU] added testCallEventually
vga91 added a commit that referenced this pull request Dec 19, 2023
…nstance (#3800) (#3872)

* [6R2yEhGU] No procedure with name xxxx registered for this database instance

* [6R2yEhGU] added testCallEventually
vga91 added a commit that referenced this pull request Jan 11, 2024
…nstance (#3800)

* [6R2yEhGU] No procedure with name xxxx registered for this database instance

* [6R2yEhGU] added testCallEventually
vga91 added a commit that referenced this pull request Jan 12, 2024
…nstance (#3800) (#3873)

* [6R2yEhGU] No procedure with name xxxx registered for this database instance

* [6R2yEhGU] added testCallEventually
vga91 added a commit that referenced this pull request Jan 22, 2024
…nstance (#3800) (#3873)

* [6R2yEhGU] No procedure with name xxxx registered for this database instance

* [6R2yEhGU] added testCallEventually
vga91 added a commit that referenced this pull request Jan 23, 2024
…nstance (#3800) (#3873)

* [6R2yEhGU] No procedure with name xxxx registered for this database instance

* [6R2yEhGU] added testCallEventually
vga91 added a commit that referenced this pull request Jan 23, 2024
…nstance (#3800) (#3873) (#3904)

* [6R2yEhGU] No procedure with name xxxx registered for this database instance

* [6R2yEhGU] added testCallEventually
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants