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

In SS sweep blocks establishment of concurrent attachments [CORE4135] #4462

Closed
firebird-automations opened this issue Jun 29, 2013 · 5 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: @hvlad

Commits: 32c5d00 ffa909f FirebirdSQL/fbt-repository@3224666 FirebirdSQL/fbt-repository@dcec4f3

@firebird-automations
Copy link
Collaborator Author

Modified by: @hvlad

assignee: Vlad Khorsun [ hvlad ]

@firebird-automations
Copy link
Collaborator Author

Commented by: @hvlad

Before the fix the order of events when attachment is established was :
- exclusive access to dbb is acquired
- attachment block is created
...
- crypt thread is started
- TRA_sweep is run, if necessary
- BackupManager::endBackup is called
- "ATTACH_DATABASE" event is fired
- ON CONNECT trigger is fired
- exclusive access to dbb is released and concurrent attachments to the same dbb is allowed

TRA_sweep is run while exclusive access to dbb is holds, therefore it blocks cuncurrent attach_database calls.
Note: if exception is raised then "FAILED ATTACH_DATABASE" event is fired

New order of events is:
- exclusive access to dbb is acquired
- attachment block is created
...
- exclusive access to dbb is released and concurrent attachments to the same dbb is allowed
- "ATTACH_DATABASE" event is fired
- BackupManager::endBackup is called
- TRA_sweep is run, if necessary
- crypt thread is started
- ON CONNECT trigger is fired

If exception is raised after "ATTACH_DATABASE" was fired, then "ERROR" and "DETACH_DATABASE" events will be fired.

@firebird-automations
Copy link
Collaborator Author

Modified by: @hvlad

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

resolution: Fixed [ 1 ]

Fix Version: 3.0 Alpha 1 [ 10331 ]

Fix Version: 2.5.3 [ 10461 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

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

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

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

QA Status: Done successfully

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