mirror of
https://github.com/apple/foundationdb.git
synced 2025-05-15 02:18:39 +08:00
Add a bit of documentation, and the TODO trail for future work.
This commit is contained in:
parent
ccaac162e2
commit
342eebebdb
@ -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 ) {
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user