1
0
Fork 0

removed code for special handling of _trx and _replication

This commit is contained in:
Jan Steemann 2014-06-23 09:03:42 +02:00
parent 06e033c0c8
commit ebb7e61045
5 changed files with 10 additions and 25 deletions

View File

@ -267,16 +267,11 @@ static TRI_vocbase_col_t* CoordinatorCollection (TRI_vocbase_t* vocbase,
if (TRI_IsSystemNameCollection(c->_name)) {
// a few system collections have special behavior
if (TRI_EqualString(c->_name, TRI_COL_NAME_REPLICATION) ||
TRI_EqualString(c->_name, TRI_COL_NAME_USERS) ||
if (TRI_EqualString(c->_name, TRI_COL_NAME_USERS) ||
TRI_IsPrefixString(c->_name, TRI_COL_NAME_STATISTICS)) {
// these collections cannot be dropped or renamed
c->_canDrop = false;
c->_canRename = false;
// the replication collection cannot be unloaded manually)
// (this would make the server hang)
c->_canUnload = ! TRI_EqualString(c->_name, TRI_COL_NAME_REPLICATION);
}
}

View File

@ -94,12 +94,6 @@ struct TRI_vocbase_col_s;
#define TRI_COL_VERSION TRI_COL_VERSION_20
////////////////////////////////////////////////////////////////////////////////
/// @brief predefined system collection name for replication
////////////////////////////////////////////////////////////////////////////////
#define TRI_COL_NAME_REPLICATION "_replication"
////////////////////////////////////////////////////////////////////////////////
/// @brief predefined system collection name for transactions
////////////////////////////////////////////////////////////////////////////////

View File

@ -72,9 +72,7 @@ bool TRI_ExcludeCollectionReplication (const char* name) {
return false;
}
if (TRI_EqualString(name, TRI_COL_NAME_REPLICATION) ||
TRI_EqualString(name, TRI_COL_NAME_TRANSACTION) ||
TRI_EqualString(name, TRI_COL_NAME_USERS) ||
if (TRI_EqualString(name, TRI_COL_NAME_USERS) ||
TRI_IsPrefixString(name, TRI_COL_NAME_STATISTICS) ||
TRI_EqualString(name, "_aal") ||
TRI_EqualString(name, "_fishbowl") ||

View File

@ -1046,10 +1046,12 @@ int TRI_DumpLogReplication (TRI_vocbase_t* vocbase,
TRI_voc_tick_t dataMin,
TRI_voc_tick_t dataMax,
uint64_t chunkSize) {
TRI_vocbase_col_t* col;
TRI_barrier_t* b;
int res;
//TRI_vocbase_col_t* col;
//TRI_barrier_t* b;
//int res;
return TRI_ERROR_NOT_IMPLEMENTED;
/*
TRI_vocbase_col_status_e status;
col = TRI_UseCollectionByNameVocBase(vocbase, TRI_COL_NAME_REPLICATION, status);
@ -1080,6 +1082,7 @@ int TRI_DumpLogReplication (TRI_vocbase_t* vocbase,
TRI_ReleaseCollectionVocBase(vocbase, col);
return res;
*/
}
////////////////////////////////////////////////////////////////////////////////

View File

@ -482,16 +482,11 @@ static TRI_vocbase_col_t* AddCollection (TRI_vocbase_t* vocbase,
// check for special system collection names
if (TRI_IsSystemNameCollection(name)) {
// a few system collections have special behavior
if (TRI_EqualString(name, TRI_COL_NAME_REPLICATION) ||
TRI_EqualString(name, TRI_COL_NAME_USERS) ||
if (TRI_EqualString(name, TRI_COL_NAME_USERS) ||
TRI_IsPrefixString(name, TRI_COL_NAME_STATISTICS)) {
// these collections cannot be dropped or renamed
init._canDrop = false;
init._canRename = false;
// the replication collection cannot be unloaded manually)
// (this would make the server hang)
init._canUnload = ! TRI_EqualString(name, TRI_COL_NAME_REPLICATION);
}
}
@ -1275,7 +1270,7 @@ static int ScanTrxCollection (TRI_vocbase_t* vocbase) {
TRI_vocbase_col_t* collection = TRI_LookupCollectionByNameVocBase(vocbase, TRI_COL_NAME_TRANSACTION);
if (collection == nullptr) {
// collection not found, no problem
// collection not found, no problem - seems to be a newer ArangoDB version
return TRI_ERROR_NO_ERROR;
}