Add a bit of documentation, and the TODO trail for future work.

This commit is contained in:
Alex Miller 2020-05-13 18:44:22 -07:00
parent ccaac162e2
commit 342eebebdb
2 changed files with 10 additions and 1 deletions

View File

@ -26,7 +26,7 @@
#error "You cannot use mutation tracking in a clean/release build."
#endif
StringRef debugKey = LiteralStringRef( "\xff/globals/lastEpochEnd" );
StringRef debugKey = LiteralStringRef( "" );
StringRef debugKey2 = LiteralStringRef( "\xff\xff\xff\xff" );
TraceEvent debugMutationEnabled( const char* context, Version version, MutationRef const& mutation ) {

View File

@ -26,15 +26,24 @@
#include "fdbclient/CommitTransaction.h"
#define MUTATION_TRACKING_ENABLED 0
// The keys to track are defined in the .cpp file to limit recompilation.
#define DEBUG_MUTATION(context, version, mutation) MUTATION_TRACKING_ENABLED && debugMutation(context, version, mutation)
TraceEvent debugMutation( const char* context, Version version, MutationRef const& mutation );
// debugKeyRange and debugTagsAndMessage only log the *first* occurrence of a key in their range/commit.
// TODO: Create a TraceEventGroup that forwards all calls to each element of a vector<TraceEvent>,
// to allow "multiple" TraceEvents to be returned.
#define DEBUG_KEY_RANGE(context, version, keys) MUTATION_TRACKING_ENABLED && debugKeyRange(context, version, keys)
TraceEvent debugKeyRange( const char* context, Version version, KeyRangeRef const& keys );
#define DEBUG_TAGS_AND_MESSAGE(context, version, commitBlob) MUTATION_TRACKING_ENABLED && debugTagsAndMessage(context, version, commitBlob)
TraceEvent debugTagsAndMessage( const char* context, Version version, StringRef commitBlob );
// TODO: Version Tracking. If the bug is in handling a version rather than a key, then it'd be good to be able to log each time
// that version is handled within simulation. A similar set of functions should be implemented.
#endif