You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-user@db.apache.org by Glenn McGregor <gl...@lucentradius.com> on 2008/10/19 03:35:22 UTC

replication - master log overflow

How is one supposed to tell if a database in 'master'
mode has exceeded its log buffer limit after its become isolated
from the 'slave'?

The description from the admin guide below indicates
it can happen, but not how to tell it has.

<quote>
Transactions are allowed to continue processing while
the master tries to reconnect with the slave. Log records
generated while the connection is down are buffered
in main memory. If the log buffer reaches its size limit
before the connection can be reestablished, the master
replication functionality is stopped. You can use the property
derby.replication.logBufferSize to configure the size limit of
the buffer; see Tuning Derby for details
</quote>


Thanks

Glenn McGregor

RE: replication - master log overflow

Posted by Andrew Lawrenson <an...@coppereye.com>.
I would also welcome a programatic way to determine the status of the master and/or slave.

I'm currently planning (but haven't got there yet) to regularly try & connect to the slave, and make sure we get a failure with a sqlstate indicating it's won't accept connections due to being a slave - but this is about the only programatic check I've come up with so far.

Andrew Lawrenson

-----Original Message-----
From: Glenn McGregor [mailto:gm44@alcatel-lucent.com]
Sent: 21 October 2008 23:18
To: Derby Discussion
Subject: Re: replication - master log overflow

Jørgen Løland wrote:
> Glenn McGregor wrote:
>> How is one supposed to tell if a database in 'master'
>> mode has exceeded its log buffer limit after its become isolated from
>> the 'slave'?
>
> You'll have to look in the derby.log file on the master to learn this.
> You'll find something like this (from memory - the actual text may
> differ slightly):

Sorry, I was not specific enough in my question.  Is there a way to determine this condition programmatically?
I am attempting to automate the various steps of the sync-up and failover, and I need more information about what state a database is in, both on the master and slave servers.

Thanks

Glenn


RE: replication - master log overflow

Posted by Andrew Lawrenson <an...@coppereye.com>.
Knut,

        I can't see a JIRA issue raised by anyone for this, so I've raised one (https://issues.apache.org/jira/browse/DERBY-3927)

        Andy

-----Original Message-----
From: Knut.Hatlen@Sun.COM [mailto:Knut.Hatlen@Sun.COM]
Sent: 22 October 2008 12:29
To: Derby Discussion
Subject: Re: replication - master log overflow

Glenn McGregor <gm...@alcatel-lucent.com> writes:

> Jørgen Løland wrote:
>> Glenn McGregor wrote:
>>> How is one supposed to tell if a database in 'master'
>>> mode has exceeded its log buffer limit after its become isolated
>>> from the 'slave'?
>>
>> You'll have to look in the derby.log file on the master to learn
>> this. You'll find something like this (from memory - the actual text
>> may differ slightly):
>
> Sorry, I was not specific enough in my question.  Is there a way to
> determine this condition programmatically?
> I am attempting to automate the various steps of the sync-up and
> failover, and I need more information about what state a database is
> in, both on the master and slave servers.

Hi Glenn,

I don't think there is an easy way to determine it programmatically, but I can't imagine that it would be very difficult to provide it (through a stored procedure and/or the JMX interface). It would certainly be useful. Please file a JIRA issue so that we can track this feature
request: https://issues.apache.org/jira/browse/DERBY

--
Knut Anders

Re: replication - master log overflow

Posted by Knut Anders Hatlen <Kn...@Sun.COM>.
Glenn McGregor <gm...@alcatel-lucent.com> writes:

> Jørgen Løland wrote:
>> Glenn McGregor wrote:
>>> How is one supposed to tell if a database in 'master'
>>> mode has exceeded its log buffer limit after its become isolated
>>> from the 'slave'?
>>
>> You'll have to look in the derby.log file on the master to learn
>> this. You'll find something like this (from memory - the actual text
>> may differ slightly):
>
> Sorry, I was not specific enough in my question.  Is there a way to
> determine this condition programmatically?
> I am attempting to automate the various steps of the sync-up and
> failover, and I need more information about what
> state a database is in, both on the master and slave servers.

Hi Glenn,

I don't think there is an easy way to determine it programmatically, but
I can't imagine that it would be very difficult to provide it (through a
stored procedure and/or the JMX interface). It would certainly be
useful. Please file a JIRA issue so that we can track this feature
request: https://issues.apache.org/jira/browse/DERBY

-- 
Knut Anders

Re: replication - master log overflow

Posted by Glenn McGregor <gm...@alcatel-lucent.com>.
Jørgen Løland wrote:
> Glenn McGregor wrote:
>> How is one supposed to tell if a database in 'master'
>> mode has exceeded its log buffer limit after its become isolated
>> from the 'slave'?
>
> You'll have to look in the derby.log file on the master to learn this. 
> You'll find something like this (from memory - the actual text may 
> differ slightly):

Sorry, I was not specific enough in my question.  Is there a way to 
determine this condition programmatically?
I am attempting to automate the various steps of the sync-up and 
failover, and I need more information about what
state a database is in, both on the master and slave servers.

Thanks

Glenn


Re: replication - master log overflow

Posted by Jørgen Løland <Jo...@Sun.COM>.
Glenn McGregor wrote:
> How is one supposed to tell if a database in 'master'
> mode has exceeded its log buffer limit after its become isolated
> from the 'slave'?

You'll have to look in the derby.log file on the master to learn this. 
You'll find something like this (from memory - the actual text may 
differ slightly):

-------- BEGIN REPLICATION ERROR MESSAGE (<date>)---------
Exception occurred during log shipping.
<stack trace for a LogBufferFullException>
--------- END REPLICATION ERROR MESSAGE ----------

-- 
Jørgen Løland

Re: replication - master log overflow

Posted by Glenn McGregor <gl...@lucentradius.com>.
Glenn McGregor wrote:

See below:
> How is one supposed to tell if a database in 'master'
> mode has exceeded its log buffer limit after its become isolated
> from the 'slave'?
>
> The description from the admin guide below indicates
> it can happen, but not how to tell it has.
>
> <quote>
> Transactions are allowed to continue processing while
> the master tries to reconnect with the slave. Log records
> generated while the connection is down are buffered
> in main memory. If the log buffer reaches its size limit
> before the connection can be reestablished, the master
> replication functionality is stopped. You can use the property
> derby.replication.logBufferSize to configure the size limit of
> the buffer; see Tuning Derby for details
> </quote>
>
>
> Thanks
>
> Glenn McGregor
>
Sorry, I was not specific enough in my question.  Is there a way to 
determine this condition programmatically?
I am attempting to automate the various steps of the sync-up and 
failover, and I need more information about what
state a database is in, both on the master and slave servers.

Thanks