1
0
Fork 0

revert a previous change that caused existing system collections on a slave to be truncated instead of being deleted (#8443)

truncating instead of deleting introduced the possibility of the collection's indexes continuing to exist with different ids on the slave than on the master, leading to potential follow-up problems
This commit is contained in:
Jan 2019-03-18 20:56:50 +01:00 committed by GitHub
parent 472d83eb87
commit f621fe6076
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 3 deletions

View File

@ -1128,9 +1128,10 @@ Result DatabaseInitialSyncer::handleCollection(VPackSlice const& parameters,
if (col != nullptr) {
bool truncate = false;
if (col->system()) {
// better not throw away system collections. otherwise they may be dropped
// and this can be a problem if the server crashes before they are recreated.
if (col->name() == TRI_COL_NAME_USERS) {
// better not throw away the _users collection. otherwise it is gone
// and this may be a problem if the
// server crashes in-between.
truncate = true;
}