Issue Details (XML | Word | Printable)

Key: CORE-4135
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Vlad Khorsun
Reporter: Vlad Khorsun
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Firebird Core

In SS sweep blocks establishment of concurrent attachments

Created: 29/Jun/13 10:43 AM   Updated: 30/Dec/15 12:22 AM
Component/s: Engine
Affects Version/s: 3.0 Initial, 2.5.2 Update 1
Fix Version/s: 3.0 Alpha 1, 2.5.3

Environment: Super Server architecture

QA Status: Done successfully


 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Vlad Khorsun added a comment - 29/Jun/13 11:27 AM
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.