Issue Details (XML | Word | Printable)

Key: CORE-2498
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Adriano dos Santos Fernandes
Reporter: Adriano dos Santos Fernandes
Votes: 0
Watchers: 0
Operations

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

Make a single attachment usabe by more than one simultaneous threads in embedded

Created: 06/Jun/09 03:17 AM   Updated: 12/Nov/09 03:05 PM
Component/s: None
Affects Version/s: 2.5 Beta 1
Fix Version/s: 2.5 Beta 2

Time Tracking:
Not Specified

Planning Status: Unspecified


 Description  « Hide
It was throwing "attachment handle is busy" error. Now callers will block until others requests are completed.

 All   Comments   Work Log   Change History   Version Control   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Alexander Peshkov added a comment - 08/Jun/09 08:50 AM
Adriano, is it tested anyhow / anyway except SAS? I do not see any code problems at the first glance, but agree that we are trying to walk on a very thin ice at beta stage.

Next, I see at least one potential problem with this improvement - it makes possible to have bad programming style. Imagine MT application, which is using single attachment in all threads. With this improvement it will be very hard to notice any problem as long as such application is not running on SMP system under high load. And I can imagine a ticket like 'FB 2.5 badly supports SMP in MT environment'.

Dmitry Yemanov added a comment - 08/Jun/09 10:59 AM
Alex, I somewhat disagree. Surely we should clearly document that we don't support concurrent access to an attachment, regardless of whether we block or throw an error. As soon as it's documented, everybody stepping on this rake can be reasonably blamed in the support lists or the tracker. I'm not sure we can (or even should try to) protect from whatever stupid application users can code.