New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fb4 RC1 synchronous replication to localhost hang on disconnect [CORE6497] #6727
Comments
Modified by: @dyemanovassignee: Dmitry Yemanov [ dimitr ] |
Commented by: Martin Wong (mw140213) I can reproduce the same issue with the following scenario: 1- Connect to the replica database and keep the connection active. I hope that will help to find the issue. |
Commented by: @dyemanov I've committed the fix, please test the next (tomorrow's) snapshot build. |
Commented by: Lucas Schatz (arvanus) Hi @dmitry just downloaded the snapshot Firebird-4.0.0.2372-ReleaseCandidate1.amd64.tar.gz, but it still hang |
Commented by: @dyemanov No, snapshots are built nightly and available here: http://web.firebirdsql.org/downloads/snapshot_builds/ |
Commented by: Martin Wong (mw140213) I already downloaded the today's snapshot and test it, the problem fixed and no more hanging after disconnecting from the master database. |
Commented by: @dyemanov Thanks for confirmation. |
Commented by: Lucas Schatz (arvanus) I tested here too, problem fixed |
Modified by: @dyemanovstatus: Open [ 1 ] => Resolved [ 5 ] resolution: Fixed [ 1 ] Fix Version: 4.0.0 [ 10931 ] |
The same issue may be still present when using superclassic mode (tested with snapshot Firebird-4.0.1.2628-0_x64 from 2021-10-12). When using ServerMode = SuperClassic, the replication hangs as soon as I disconnect from master db. |
@ittentmf Does it happen when both primary and replica databases are served by the same host (and single FB instance), as described in this ticket? Or you can also reproduce it if replication is set up over the wire? |
@dyemanov It happens in both scenarious, same host and over the wire. maybe worth mentioning: when replication database is on different host, the issue occurs only if master host uses superclassic mode. if master host uses superserver and replication host uses superclassic, the issue does not occur. |
Confirmed, thanks. Working on a solution. |
@ittentmf It should be fixed now (build 2646). |
@dyemanov looks good. can not reproduce the issue anymore. thanks. |
Submitted by: Lucas Schatz (arvanus)
Steps to reproduce:
replication.conf:
database = /db/primary.fdb
{
sync_replica = SYSDBA:*******@localhost:/db/replica.fdb
}
systemctl stop firebird
mkdir /db
chown firebird. /db
rm /db/primary.fdb /db/replica.fdb -f
systemctl start firebird
echo "create database 'localhost:/db/primary.fdb';ALTER DATABASE ENABLE PUBLICATION; ALTER DATABASE INCLUDE ALL TO PUBLICATION;quit;" | /opt/firebird/bin/isql
systemctl stop firebird
cp -a primary.fdb replica.fdb
gfix -replica read_write /db/replica.fdb
systemctl start firebird
echo "show table;quit;" | /opt/firebird/bin/isql localhost:/db/primary.fdb
echo "show table;quit;" | /opt/firebird/bin/isql localhost:/db/replica.fdb
echo "create table tb1 (a integer not null, constraint tb1_pk primary key (a));commit;quit;" | /opt/firebird/bin/isql localhost:/db/primary.fdb #Here the script hang on the quit; command and I need to pkill -9 both isql and firebird
pkill -9 firebird; pkill -9 isql
echo "show table;quit;" | /opt/firebird/bin/isql localhost:/db/primary.fdb #Table is created
echo "show table;quit;" | /opt/firebird/bin/isql localhost:/db/replica.fdb #Table is replicated
No error in replication.log nor firebird.log
Commits: f18079a
The text was updated successfully, but these errors were encountered: