Arangodb stops async replication after some time

11/15/2017

I use ArangoDB 3.2.2 on Kubernetes. I have one master db and one slave db. on the slave db inside the arangosh I enter the following commands:

db._useDatabase("mydb");

equire("@arangodb/replication").setupReplication({
  endpoint: "tcp://master:8529",
  username: "root",
  password: "123456",
  database: "mydb",
  verbose: true,
  includeSystem: false,
  incremental: true,
  autoResync: true,
  maxConnectRetries: 20,
  adaptivePolling: false,
  idleMinWaitTime: 0.001,
  idleMaxWaitTime: 1.5,
  chunkSize: 5000
});

The command blocks for a few seconds and then the replication is started and I can see that the collections from the master db are replicated to the slave. However, after some time the replication stops.

When I run: require("@arangodb/replication").applier.state This is what I see:

{ 
  "state" : { 
    "running" : true, 
    "lastAppliedContinuousTick" : "6384020", 
    "lastProcessedContinuousTick" : "6384026", 
    "lastAvailableContinuousTick" : "6389353", 
    "safeResumeTick" : "6382367", 
    "progress" : { 
      "time" : "2017-11-15T12:14:09Z", 
      "message" : "fetching master log from tick 6382367, first regular tick 6367894, barrier: 0, open transactions: 0", 
      "failedConnects" : 0 
    }, 
    "totalRequests" : 1155, 
    "totalFailedConnects" : 0, 
    "totalEvents" : 83, 
    "totalOperationsExcluded" : 0, 
    "lastError" : { 
      "errorNum" : 0 
    }, 
    "time" : "2017-11-15T12:15:47Z" 
  }, 
  "server" : { 
    "version" : "3.2.2", 
    "serverId" : "77969163868004" 
  }, 
  "endpoint" : "tcp://master:8529", 
  "database" : "mydb" 
}

When I run the replication command again I see that the collections are being replicated again...

How can I initialize a stable replication process? I understand that this is an asynchronous replication but in my use case I need the slave to be updated as fast as possible... Does my replication config is fit to my needs?

-- Mizh
arangodb
kubernetes
replication

1 Answer

11/21/2017

It seems like it was a bug in ArangoDB 3.2.2 In ArangoDB 3.2.8 The replication seems to work (even with rocksdb).

-- Mizh
Source: StackOverflow