mirror of https://gitee.com/bigwinds/arangodb
Coordinator will not always wait for system collection replication
This commit is contained in:
parent
63a173f002
commit
c1db7228c7
|
@ -50,12 +50,19 @@
|
|||
}
|
||||
|
||||
if (internal.threadNumber === 0) {
|
||||
// Wait for synchronous replication of system colls to settle:
|
||||
console.info('Waiting for synchronous replication of system collections...');
|
||||
var db = internal.db;
|
||||
var colls = db._collections();
|
||||
colls = colls.filter(c => c.name()[0] === '_');
|
||||
require('@arangodb/cluster').waitForSyncRepl('_system', colls);
|
||||
var systemCollectionsCreated = global.ArangoAgency.get('SystemCollectionsCreated');
|
||||
if (!(systemCollectionsCreated && systemCollectionsCreated.arango && systemCollectionsCreated.arango.SystemCollectionsCreated)) {
|
||||
// Wait for synchronous replication of system colls to settle:
|
||||
console.info('Waiting for initial replication of system collections...');
|
||||
var db = internal.db;
|
||||
var colls = db._collections();
|
||||
colls = colls.filter(c => c.name()[0] === '_');
|
||||
if (!require('@arangodb/cluster').waitForSyncRepl('_system', colls)) {
|
||||
console.error('System collections not properly set up. Starting anyway now...');
|
||||
} else {
|
||||
global.ArangoAgency.set('SystemCollectionsCreated', true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (internal.threadNumber === 0) {
|
||||
|
|
Loading…
Reference in New Issue