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

Metadata in Lock conflict after SQL Statement [CORE5267] #5546

Closed
firebird-automations opened this issue Jun 10, 2016 · 7 comments
Closed

Metadata in Lock conflict after SQL Statement [CORE5267] #5546

firebird-automations opened this issue Jun 10, 2016 · 7 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: Benjamin Bacik (benjamincomed)

Duplicates CORE3766

After normal SQL-Statement the Procedure is locked.
I cannot Edit the DDL of this Procedures. Database-Monitoring showing everything ok and clean.
Event after Hours the procedures cannot be edited.
The other Connection has to be closed, so that the ddl can be edited.

Message:
lock conflickt in no wait transaction
unsuccessfull metadata update
object PROCEDURE "" is in use

--> it does'nt even show the procedurename
-->its impossible to edit any procedure on a system until all users who called one the procedures to be edited are disconnected.

@firebird-automations
Copy link
Collaborator Author

Commented by: @dyemanov

You need to alter procedures using a WAIT transaction mode. With a NO WAIT transaction, the error you mention is expected.

@firebird-automations
Copy link
Collaborator Author

Commented by: Sean Leyne (seanleyne)

Dmitry,

WAIT really wouldn't help, no? It would simply mean that the statement would not return and wait "forever", which is really not a good solution.

IMO, the current functionality is correct. You can't update the SP.

@firebird-automations
Copy link
Collaborator Author

Commented by: @dyemanov

Sean, it does not look obvious, but believe me it helps. Cached procedures immediately release their locks once requested, the old copy remains cached by existing queries while the new version will be used by newly prepared queries. There's no blockage involved, so there's no need to wait "forever" - ALTER PROCEDURE succeeds immediately regardless of the lock timeout value. The only exception is zero timeout (NO WAIT mode) - request is just not sent to the cached procedure in this case, so the it remains "locked" until all queries using it are released.

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

Link: This issue duplicates CORE3766 [ CORE3766 ]

@firebird-automations
Copy link
Collaborator Author

Commented by: @dyemanov

More or less "as designed / pitfall" from the historical POV, but looks quite annoying for newcomers. Supposedly it could be improved some day (CORE3766 exists for this purpose).

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Duplicate [ 3 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

status: Resolved [ 5 ] => Closed [ 6 ]

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

No branches or pull requests

1 participant