Re: [jgroups-users] JDBC - Cloning DB

Questions/problems related to using JGroups <[email protected]> Thu, 21 Jun 2018 15:21:28 +0200
Newsgroups gmane.comp.java.javagroups.general
Message-ID <mailman.14039.1529587300.30729.javagroups-users@lists.sourceforge.net>

On 21/06/18 14:50, Questions/problems related to using JGroups wrote:

>> I think the problem may have disappeared just by chance. I would start
>> looking into whether that export/import procedure creates exactly the
>> same DB table on both sides, and what happens when the table is updated.
>>
>> I still don't understand why you have 2 DBs instead of 1. And if you
>> need this for HA, then I suggest to use the DB's replication mechanism
>> to replicate your data, and not a self-made and brittle export/import
>> mechanism.
>>
> My bad, I probably did not make this clear. We don't have two DBs, but once a mistake occurred and I wanted to check
> what may have caused those messages being printed out - this may help me in clarifying how the whole thing works.
> 
> Is there a quick win to log all actions performed on the table by a certain node ? Without me having to insert manual prints
> or place breakpoints.

I think quickly modifying JGroups code to print out the SQL statements 
should be trivial. You could also use Byteman to do that, mainly 
instrument PreparedStatement.execute/executeUpdate().

Or perhaps the DB has a log itself? I'm going to quickly add TRACE code 
to JDBC_PING (in master) to print out all SQL statements.


-- 
Bela Ban | http://www.jgroups.org


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot