mirror of https://gitee.com/bigwinds/arangodb
Improve error messages.
This commit is contained in:
parent
e06c65a7a6
commit
7dec299c3a
|
@ -94,6 +94,9 @@ function startReadLockOnLeader (endpoint, database, collName, timeout) {
|
|||
}
|
||||
console.debug("startReadLockOnLeader: Do not see read lock yet...");
|
||||
}
|
||||
var asyncJobId = rr.headers["x-arango-async-id"];
|
||||
r = require({ url: url + "/_api/job/" + asyncJobId, body: "", method: "PUT"});
|
||||
console.error("startReadLockOnLeader: giving up, async result:", r);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -956,6 +959,8 @@ function synchronizeLocalFollowerCollections (plannedCollections,
|
|||
ok = false;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
console.error("lockJobId was false");
|
||||
}
|
||||
if (ok) {
|
||||
console.info("Synchronization worked for shard", shard);
|
||||
|
|
|
@ -34,7 +34,6 @@ const arangodb = require("@arangodb");
|
|||
const db = arangodb.db;
|
||||
const ERRORS = arangodb.errors;
|
||||
const _ = require("lodash");
|
||||
const print = require("internal").print;
|
||||
const wait = require("internal").wait;
|
||||
const suspendExternal = require("internal").suspendExternal;
|
||||
const continueExternal = require("internal").continueExternal;
|
||||
|
@ -67,6 +66,7 @@ function SynchronousReplicationSuite () {
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
function waitForSynchronousReplication(database) {
|
||||
console.info("Waiting for synchronous replication to settle...");
|
||||
cinfo = global.ArangoClusterInfo.getCollectionInfo(database, cn);
|
||||
shards = Object.keys(cinfo.shards);
|
||||
var count = 0;
|
||||
|
@ -76,7 +76,7 @@ function SynchronousReplicationSuite () {
|
|||
);
|
||||
let replicas = ccinfo.map(s => s.servers.length);
|
||||
if (_.all(replicas, x => x === 2)) {
|
||||
print("Replication up and running!");
|
||||
console.info("Replication up and running!");
|
||||
return true;
|
||||
}
|
||||
wait(0.5);
|
||||
|
@ -280,15 +280,11 @@ function SynchronousReplicationSuite () {
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
setUp : function () {
|
||||
console.error("Dumdidum");
|
||||
var systemCollServers = findCollectionServers("_system", "_graphs");
|
||||
console.error("Dumdidum");
|
||||
while (true) {
|
||||
console.error("Dumdidei");
|
||||
db._drop(cn);
|
||||
c = db._create(cn, {numberOfShards: 1, replicationFactor: 2});
|
||||
var servers = findCollectionServers("_system", cn);
|
||||
console.error("Dideldum:", systemCollServers, servers, _.intersection(systemCollServers, servers));
|
||||
if (_.intersection(systemCollServers, servers).length === 0) {
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue