Sweep and replication

29 views
Skip to first unread message

Dany40

unread,
May 15, 2023, 11:02:31 AM5/15/23
to firebird-support
Hello!

Doing async replication, I see Firebird is doing sweeps on the replica side. I don't see any problem or error on the logs,  but I am trying to understand why this is fine, but it is not fine to generate the starting point in the replica side by restoring a gbak backup file created for the master db before starting replication.

Thank you!


Dimitry Sibiryakov

unread,
May 15, 2023, 11:09:15 AM5/15/23
to firebird...@googlegroups.com
Dany40 wrote 15.05.2023 17:02:
> Doing async replication, I see Firebird is doing sweeps on the replica side.

How do you see it? What are transaction counters before and after?

--
WBR, SD.

Dany40

unread,
May 15, 2023, 11:39:45 AM5/15/23
to firebird-support
I know that because Firebird is writting sweep tasks on the firebird.log, I don't know how are the transaction counters after and before.

Dimitry Sibiryakov

unread,
May 15, 2023, 11:43:36 AM5/15/23
to firebird...@googlegroups.com
Dany40 wrote 15.05.2023 17:39:
> I know that because Firebird is writting sweep tasks on the firebird.log, I
> don't know how are the transaction counters after and before.

These counters are written into the log aside with sweep start and end messages.
Are you sure that this is autosweep and not a scheduled task in your system?

--
WBR, SD.

Dany40

unread,
May 15, 2023, 11:55:01 AM5/15/23
to firebird-support
For example:

MULET Mon May 15 00:00:27 2023
Sweep is started by SWEEPER
Database "E:\SLAVE\00000082.FDB"
OIT 71312, OAT 91313, OST 91313, Next 91313

MULET Mon May 15 00:00:30 2023
Sweep is finished
Database "E:\SLAVE\00000082.FDB"
OIT 91313, OAT 91313, OST 91313, Next 91314

And yes, I am sure I am not doing this task, only Firebird is working over the replica databases.

Dimitry Sibiryakov

unread,
May 15, 2023, 11:59:20 AM5/15/23
to firebird...@googlegroups.com
Dany40 wrote 15.05.2023 17:55:
> For example:
>
> MULETMon May 15 00:00:27 2023
> Sweep is started by SWEEPER
> Database "E:\SLAVE\00000082.FDB"
> OIT 71312, OAT 91313, OST 91313, Next 91313
>
> MULETMon May 15 00:00:30 2023
> Sweep is finished
> Database "E:\SLAVE\00000082.FDB"
> OIT 91313, OAT 91313, OST 91313, Next 91314
>
> And yes, I am sure I am not doing this task, only Firebird is working over the
> replica databases.

It looks like the result of a hard rollback of transaction 71312. Is there
anything interesting in replication log?
Sweep is finished in three seconds and successfully moved the counter to max.
I see no need to worry but the stuck counter may suggest a bug in Apply module.
Let's wait for Dmitry Yemanov.

--
WBR, SD.

Dmitry Yemanov

unread,
May 15, 2023, 12:46:44 PM5/15/23
to 'Dimitry Sibiryakov' via firebird-support
Sweeping itself on the replica side is kinda normal. First, a hard
rollback of the "big" transaction is replicated also with a rollback,
thus freezing OIT. Second, if there's a delay in segments delivery, the
replica may be disconnected in the middle of active transaction (to be
replayed later) and it may cause a hard rollback too. I have a patch to
reduce the probability of the latter case, but the former one may still
be possible.


Dmitry


Dany40

unread,
May 15, 2023, 1:49:39 PM5/15/23
to firebird-support
OK. I don't see something important on replication.log now. But the next time I found a sweet on any replica, I will post here all both logs.

Dany40

unread,
May 18, 2023, 8:58:36 AM5/18/23
to firebird-support
Hello;
Here we have another case. In firebird.log:


MULET Wed May 17 19:08:43 2023

Sweep is started by SWEEPER
Database "E:\SLAVE\56168592.FDB"
OIT 43697, OAT 63697, OST 63697, Next 63697

MULET Wed May 17 19:08:44 2023
Sweep is finished
Database "E:\SLAVE\56168592.FDB"
OIT 63697, OAT 63698, OST 63698, Next 63699

An nothing in the replication.log

Regards.

Reply all
Reply to author
Forward
0 new messages