Adding back debug stream uid to help track down bugs

This commit is contained in:
Josh Slocum 2022-03-10 13:55:42 -06:00
parent 903f7adbc4
commit 211e5b579a
3 changed files with 11 additions and 2 deletions

View File

@ -7788,6 +7788,9 @@ ACTOR Future<Void> mergeChangeFeedStream(Reference<DatabaseContext> db,
if (replyBufferSize != -1 && req.replyBufferSize < CLIENT_KNOBS->CHANGE_FEED_STREAM_MIN_BYTES) {
req.replyBufferSize = CLIENT_KNOBS->CHANGE_FEED_STREAM_MIN_BYTES;
}
// TODO REMOVE
req.debugUID = deterministicRandom()->randomUniqueID();
results->streams.push_back(it.first.changeFeedStream.getReplyStream(req));
}
@ -7934,6 +7937,8 @@ ACTOR Future<Void> singleChangeFeedStream(Reference<DatabaseContext> db,
req.range = range;
req.canReadPopped = canReadPopped;
req.replyBufferSize = replyBufferSize;
// TODO REMOVE
req.debugUID = deterministicRandom()->randomUniqueID();
results->streams.clear();

View File

@ -793,13 +793,15 @@ struct ChangeFeedStreamRequest {
KeyRange range;
int replyBufferSize = -1;
bool canReadPopped = true;
// TODO REMOVE
UID debugUID;
ReplyPromiseStream<ChangeFeedStreamReply> reply;
ChangeFeedStreamRequest() {}
template <class Ar>
void serialize(Ar& ar) {
serializer(ar, rangeID, begin, end, range, reply, spanContext, replyBufferSize, canReadPopped, arena);
serializer(ar, rangeID, begin, end, range, reply, spanContext, replyBufferSize, canReadPopped, debugUID, arena);
}
};

View File

@ -7884,7 +7884,9 @@ ACTOR Future<Void> serveChangeFeedStreamRequests(StorageServer* self,
ChangeFeedStreamRequest req = waitNext(changeFeedStream);
// must notify change feed that its shard is moved away ASAP
UID streamUID = deterministicRandom()->randomUniqueID();
// TODO CHANGE BACK
// UID streamUID = deterministicRandom()->randomUniqueID();
UID streamUID = req.debugUID;
self->actors.add(changeFeedStreamQ(self, req, streamUID) || stopChangeFeedOnMove(self, req, streamUID));
}
}