Re: [Sqlrelay-discussion] ping() in Java
Brought to you by:
mused
|
From: Maciej W. <mac...@co...> - 2005-12-16 22:53:14
|
Hi! Thanks for the answer. > I just ran some tests and I got the same behavior from python and java. > What version of SQL Relay are you using? Maybe there's a bug in that > version. I can't check my configuration now but AFAIR it is 0.36 (I'll check this in monday). > Give the test programs below a try and see if you don't get the same > results as the log below shows. I'll try this. The problem is that I'm not the database admin and so far I was only able to check this behaviour once a day... Next week I hope we'll have time to do some work with this java app and create another oracle instance for testing only. > If SQL Relay lost contact with the database during the backup and no > other queries had been run, then I'd expect the ping to return false, > and then the next query to cause SQL Relay to reconnect, run the query > and return rowcount of 1. This is strange for me. I expect ping to reconnect and return true in this situation. Now it seems that ping is not checking database but rather listener's status...? What for is this ping then? What logic is in that it returns 'false' even if it is possible to get data from database? > If you have 3 sqlr-connection daemons running, you'd see that behavior 3 > times. After all 3 sqlr-connections have re-established their database > conections, ping should start returning true. I will play with this. > The behavior your java program exhibits is exactly what I'd expect. > If the python program exhibits different behavior, then maybe there's a > bug there. Although ping is implemented identically for both API's. > They just wrap the C++ function. > Does the python program maybe run against a different database, where > another program may have run queries against the database since the > backup? I'm not sure. Something like that could happened. It's possible that some queries were done, maybe from java... I did not know the rule of 3 sqlr-connections ;) so maybe my interpretation was wrong and python is working like java... I'll check this next week. -- Maciej Wisniowski |