8000 remove references to MMFiles* · georgekaf/arangodb@c2a41cb · GitHub
[go: up one dir, main page]

Skip to content

Commit c2a41cb

Browse files
committed
remove references to MMFiles*
1 parent e495b5f commit c2a41cb

File tree

4 files changed

+15
-19
lines changed

4 files changed

+15
-19
lines changed

arangod/MMFiles/MMFilesCollection.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2314,7 +2314,7 @@ int MMFilesCollection::insert(transaction::Methods* trx,
23142314
transaction::BuilderLeaser builder(trx);
23152315
VPackSlice newSlice;
23162316
int res = TRI_ERROR_NO_ERROR;
2317-
if (options.recoveryMarker == nullptr) {
2317+
if (options.recoveryData == nullptr) {
23182318
TIMER_START(TRANSACTION_NEW_OBJECT_FOR_INSERT);
23192319
res = newObjectForInsert(trx, slice, fromSlice, toSlice, isEdgeCollection,
23202320
*builder.get(), options.isRestore);
@@ -2336,10 +2336,10 @@ int MMFilesCollection::insert(transaction::Methods* trx,
23362336
static_cast<MMFilesTransactionState*>(trx->state())->idForMarker(), newSlice);
23372337

23382338
MMFilesWalMarker const* marker;
2339-
if (options.recoveryMarker == nullptr) {
2339+
if (options.recoveryData == nullptr) {
23402340
marker = &insertMarker;
23412341
} else {
2342-
marker = options.recoveryMarker;
2342+
marker = static_cast<MMFilesWalMarker*>(options.recoveryData);
23432343
}
23442344

23452345
// now insert into indexes
@@ -2746,7 +2746,7 @@ int MMFilesCollection::update(arangodb::transaction::Methods* trx,
27462746

27472747
// merge old and new values
27482748
transaction::BuilderLeaser builder(trx);
2749-
if (options.recoveryMarker == nullptr) {
2749+
if (options.recoveryData == nullptr) {
27502750
mergeObjectsForUpdate(trx, oldDoc, newSlice, isEdgeCollection,
27512751
TRI_RidToString(revisionId), options.mergeObjects,
27522752
options.keepNull, *builder.get());
@@ -2768,10 +2768,10 @@ int MMFilesCollection::update(arangodb::transaction::Methods* trx,
27682768
static_cast<MMFilesTransactionState*>(trx->state())->idForMarker(), builder->slice());
27692769

27702770
MMFilesWalMarker const* marker;
2771-
if (options.recoveryMarker == nullptr) {
2771+
if (options.recoveryData == nullptr) {
27722772
marker = &updateMarker;
27732773
} else {
2774-
marker = options.recoveryMarker;
2774+
marker = static_cast<MMFilesWalMarker*>(options.recoveryData);
27752775
}
27762776

27772777
VPackSlice const newDoc(marker->vpack());
@@ -2893,10 +2893,10 @@ int MMFilesCollection::replace(
28932893
static_cast<MMFilesTransactionState*>(trx->state())->idForMarker(), builder->slice());
28942894

28952895
MMFilesWalMarker const* marker;
2896-
if (options.recoveryMarker == nullptr) {
2896+
if (options.recoveryData == nullptr) {
28972897
marker = &replaceMarker;
28982898
} else {
2899-
marker = options.recoveryMarker;
2899+
marker = static_cast<MMFilesWalMarker*>(options.recoveryData);
29002900
}
29012901

29022902
VPackSlice const newDoc(marker->vpack());
@@ -2973,10 +2973,10 @@ int MMFilesCollection::remove(arangodb::transaction::Methods* trx, VPackSlice co
29732973
builder->slice());
29742974

29752975
MMFilesWalMarker const* marker;
2976-
if (options.recoveryMarker == nullptr) {
2976+
if (options.recoveryData == nullptr) {
29772977
marker = &removeMarker;
29782978
} else {
2979-
marker = options.recoveryMarker;
2979+
marker = static_cast<MMFilesWalMarker*>(options.recoveryData);
29802980
}
29812981

29822982
TRI_IF_FAILURE("RemoveDocumentNoLock") {

arangod/MMFiles/MMFilesWalRecoverState.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,7 @@ bool MMFilesWalRecoverState::ReplayMarker(TRI_df_marker_t const* marker,
496496

497497
OperationOptions options;
498498
options.silent = true;
499-
options.recoveryMarker = envelope;
499+
options.recoveryData = static_cast<void*>(envelope);
500500
options.isRestore = true;
501501
options.waitForSync = false;
502502
options.ignoreRevs = true;
@@ -573,7 +573,7 @@ bool MMFilesWalRecoverState::ReplayMarker(TRI_df_marker_t const* marker,
573573

574574
OperationOptions options;
575575
options.silent = true;
576-
options.recoveryMarker = envelope;
576+
options.recoveryData = static_cast<void*>(envelope);
577577
options.waitForSync = false;
578578
options.ignoreRevs = true;
579579

arangod/Utils/OperationOptions.h

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,15 @@
2727
#include "Basics/Common.h"
2828

2929
namespace arangodb {
30-
class MMFilesWalMarker;
31-
3230
// a struct for keeping document modification operations in transactions
3331
struct OperationOptions {
3432
OperationOptions()
35-
: recoveryMarker(nullptr), waitForSync(false), keepNull(true),
33+
: recoveryData(nullptr), waitForSync(false), keepNull(true),
3634
mergeObjects(true), silent(f 6D40 alse), ignoreRevs(true),
3735
returnOld(false), returnNew(false), isRestore(false) {}
3836

39-
// original marker, set by the recovery procedure only!
40-
MMFilesWalMarker* recoveryMarker;
37+
// original marker, set by the MMFiles recovery procedure only!
38+
void* recoveryData;
4139

4240
// wait until the operation has been synced
4341
bool waitForSync;

arangod/Utils/SingleCollectionTransaction.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@
3030
#include "VocBase/voc-types.h"
3131

3232
namespace arangodb {
33-
class MMFilesDocumentDitch;
34-
3533
namespace transaction {
3634
class Context;
3735
}

0 commit comments

Comments
 (0)
0