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

Audit plugin records a sencond *FAILED* EXECUTE_STATEMENT_FINISH after a "normal" one [CORE3315] #3682

Closed
firebird-automations opened this issue Jan 21, 2011 · 10 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: Anderson Farias (afarias)

Attachments:
AUDITFAIL.zip

Got an ancient database from fb 1.5 and converted to 2.5.

When testing it I've found "duplicated" EXECUTE_STATEMENT_FINISH being the second one a FAILED.

Than I discovered later the "duplicated" it's not duplicated at all, it happens after fetching [all] records. The thing is, there's no EXCEPTION or ERROR at all, nor executing the statement neither fetching records. The tables and data seems to be just fine.

So, why the "failed" message?

I've created a new database with only one table with the same structure and data of one of the "troubled" tables and I'm attaching so you can reproduce this behavior.

STEPS TO REPRODUCE:

1) download the attached zip and extract the db file
2) create an alias pointing to the db file and setup audit on it on you fbtrace.conf file
3) attach to the alias using a preffered client (I've tested using ISQL and FlameRobin)
4) execute a simple "SELECT * FROM CONFIGURACOES_SIG"
5) make sure you FETCH ALL records and commit
6) look at your audit log file

Commits: b512958 d6ec7d5

@firebird-automations
Copy link
Collaborator Author

Commented by: Anderson Farias (afarias)

sample database for reproducing the issue

@firebird-automations
Copy link
Collaborator Author

Modified by: Anderson Farias (afarias)

Attachment: AUDITFAIL.zip [ 11880 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

assignee: Vlad Khorsun [ hvlad ]

@firebird-automations
Copy link
Collaborator Author

Commented by: @hvlad

The cause of "FAILED EXECUTE_STATEMENT_FINISH" event is batching logic built-into network client.
Client asks server for a next batch of records before it (client) fully processed current batch. This is pre-fetch feature.
Therefore it is possible that next batch will be asked despite of End-Of-Stream marker alredy present in current batch.
Network server tried to fetch record, engine returns isc_sync error and this is the reason for trace to generate "FAILED EXECUTE_STATEMENT_FINISH" event.
Note, network client aware of this logic and corresponding isc_sync errors not shown to the application.

@firebird-automations
Copy link
Collaborator Author

Modified by: @hvlad

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

resolution: Fixed [ 1 ]

Fix Version: 2.5.1 [ 10333 ]

@firebird-automations
Copy link
Collaborator Author

Commented by: @hvlad

Fix is frontported into v3

@firebird-automations
Copy link
Collaborator Author

Modified by: @hvlad

Fix Version: 3.0 Alpha 1 [ 10331 ]

@firebird-automations
Copy link
Collaborator Author

Commented by: Anderson Farias (afarias)

Great! THANKS Vlad. BTW, this feature -- audit and trace -- is fantastic!! I don't know how we lived without it! ;)

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

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

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

QA Status: No test

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

2 participants