On 6-4-2015 12:21, Alex Peshkoff wrote:
> On 04/06/15 13:08, Mark Rotteveel wrote:
>> On 6-4-2015 11:53, Dimitry Sibiryakov wrote:
>>> 06.04.2015 11:49, Mark Rotteveel wrote:
>>>> The error itself is my own fault (I shouldn't have called
>>>> isc_event_counts which zeroed out the event buffer as the result buffer
>>>> was still empty), but I don't understand that I get an event callback
>>>> with length zero after step 3.
>>>>
>>>> As a sidenote: I don't understand why I get the callback at all at this
>>>> point: the event hasn't been triggered on the database yet at this point.
>>>       Usually it is the result of event cancellation. Perhaps, second call 
>>> to isc_que_event()
>>> cancels previous call instead of using new event_id.
>>>
>> Both handles have a different id, and the events are only (explicitly)
>> cancelled at the the end of the test (which isn't reached due to the error).
>>
>> If your theory is correct, that would mean that something internal to
>> the client library is cancelling the events.
>>
>
> Callback with length zero is called (in addition to a case of events
> cancellation) in a case when EOF or some abnormal data is received from
> the server instead of normal event notification. But I see no reason for
> such a call in described case.

If I add a small pause (1 to 5 milliseconds) between steps 2 and 3, the 
problem doesn't occur. This seems to indicate it is a 
threading/concurrency issue with invoking a callback in parallel with 
the invocation of isc_que_events for a different event.

At the Java side I added a lot of synchronization already (more than I 
believe should be necessary).

Mark
-- 
Mark Rotteveel

------------------------------------------------------------------------------
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to