-
-
Notifications
You must be signed in to change notification settings - Fork 258
Description
Ticket has been created after discussion with dimitr.
When DB that is intended to serve as slave has no flag 'replica' in its header, message "ERROR: invalid replicator handle" appears one time in the replication.log.
This message can confuse (for example, i firstly thought about invalid data in FB process memory).
Following are steps to reproduce.
Make empty database or take some existing (say, built-in employee). It will serve as master.
Copy this DB to some other name which will serve as replica.
Do on master:
alter database enable publication;
alter database include all to publication;
commit;
Do NOT on replica 'gfix -replica read_only | read_write' (i.e. let it remains without flag that this is replica DB!).
Create configuration file for replication and put it into FB_HOME folder:
database="c:\temp\oemul_fb40.main.fdb"
{
journal_archive_directory="c:\temp\oemul_fb40.main.fdb.LogArch"
exclude_without_pk=true
journal_segment_count=64
verbose_logging=false
journal_archive_command = "copy $(pathname) $(archivepathname)"
journal_directory="c:\temp\oemul_fb40.main.fdb.ReplLog"
journal_archive_timeout=15
}
database="c:\temp\oemul_fb40.repl.fdb"
{
verbose_logging=true
journal_source_directory="c:\temp\oemul_fb40.repl.fdb.LogArch"
apply_idle_timeout = 5
apply_error_timeout = 15
}
Restart FB and do some change on master, e.g.:
create table test(id int primary key);
commit;
insert into test(id) values(1);
commit;
drop table test;
exit;
Message "ERROR: invalid replicator handle" appear ONCE after this in replication log, and then replication gets stuck:
REPLTEST (replica) Sun Oct 3 21:11:27 2021
Database: C:\TEMP\OEMUL_FB40.REPL.SS.FDB
VERBOSE: Added 1 segment(s) to the processing queue
REPLTEST (replica) Sun Oct 3 21:11:27 2021
Database: C:\TEMP\OEMUL_FB40.REPL.SS.FDB
VERBOSE: Segment 1 replication failure at offset 48
REPLTEST (replica) Sun Oct 3 21:11:27 2021
Database: C:\TEMP\OEMUL_FB40.REPL.SS.FDB
ERROR: invalid replicator handle
REPLTEST (replica) Sun Oct 3 21:11:27 2021
Database: C:\TEMP\OEMUL_FB40.REPL.SS.FDB
VERBOSE: Suspending for 15 seconds
REPLTEST (replica) Sun Oct 3 21:11:42 2021
Database: C:\TEMP\OEMUL_FB40.REPL.SS.FDB
VERBOSE: Added 1 segment(s) to the processing queue
REPLTEST (replica) Sun Oct 3 21:11:42 2021
Database: C:\TEMP\OEMUL_FB40.REPL.SS.FDB
VERBOSE: Segment 1 replication failure at offset 48
. . .