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
Events dont get triggered after online -> shutdown -> online [DNET940] #862
Comments
Commented by: @cincuranet Can you share some code of what kind of shutdown is done on the database? |
Modified by: @cincuranetstatus: Open [ 1 ] => In Progress [ 3 ] |
Commented by: Lars Weber (l.weber) I am using ibExpert to shutdown the database and to bring it online. |
@lweberprb (hope I found the right person) That's interesting scenario. Because when you shutdown the database, the connection (socket) is not closed. But only after next operation the error is returned. Hence the application does not see any error right away. I need to think a bit about what would be the best approach to this. |
You found the right person ;) |
Yeah, watchdog-like handling is common approach people use when using events. I was playing with similar approach. The idea was to wait for any response from server for limited time and if no response is received then ask again for events. Although it works, I don't like it, it feels like a hack. I asked "core" people whether there's something in Firebird protocol that could be helpful. I'll post my findings. |
OK, looks like there's nothing on protocol level that would help this situation. And I'm not sure whether periodically re-asking for events is a good idea. Especially because it relies on timeout and that might be very difficult to tune for default "pit of success" story (not that current situation is "pit of success" :\ ). |
I'm closing it now. Some kind of watchdog/heartbeat/... is required from developer. But I'll reopen if there's some new light shed onto this problem. |
Submitted by: Lars Weber (l.weber)
The problem we are having is that already queued events are not received by the EventHandler after the database has been shutdown and brought back online.
The RemoveEventError handler does not throw an event that the application could react on and reregister the events.
The application is requiered to be restarted, as the database events are registered on application startup.
The text was updated successfully, but these errors were encountered: