Removed TLogVersion logging.
Added logging of SharedTLog ID for each TLog. Switched ID logged for TLogRejoining event to the TLog instead of the SharedTLog. Made some parameters to startRole passed by reference.
This commit is contained in:
parent
56053c565b
commit
1d9140d874
|
@ -43,7 +43,6 @@ using std::make_pair;
|
|||
using std::min;
|
||||
using std::max;
|
||||
|
||||
#define TLOG_VERSION "4.6"
|
||||
namespace oldTLog_4_6 {
|
||||
|
||||
typedef int16_t OldTag;
|
||||
|
@ -414,9 +413,7 @@ namespace oldTLog_4_6 {
|
|||
// These are initialized differently on init() or recovery
|
||||
recoveryCount(), stopped(false), initialized(false), queueCommittingVersion(0), newPersistentDataVersion(invalidVersion), recovery(Void())
|
||||
{
|
||||
std::map<std::string, std::string> details;
|
||||
details["TLogVersion"] = TLOG_VERSION;
|
||||
startRole(Role::TRANSACTION_LOG, interf.id(), tLogData->workerID, details, "Restored");
|
||||
startRole(Role::TRANSACTION_LOG, interf.id(), tLogData->workerID, {{"SharedTLog", tLogData->dbgid.shortString()}}, "Restored");
|
||||
|
||||
persistentDataVersion.init(LiteralStringRef("TLog.PersistentDataVersion"), cc.id);
|
||||
persistentDataDurableVersion.init(LiteralStringRef("TLog.PersistentDataDurableVersion"), cc.id);
|
||||
|
@ -1124,7 +1121,7 @@ namespace oldTLog_4_6 {
|
|||
// The TLogRejoinRequest is needed to establish communications with a new master, which doesn't have our TLogInterface
|
||||
TLogRejoinRequest req;
|
||||
req.myInterface = tli;
|
||||
TraceEvent("TLogRejoining", self->dbgid).detail("Master", self->dbInfo->get().master.id());
|
||||
TraceEvent("TLogRejoining", tli.id()).detail("Master", self->dbInfo->get().master.id());
|
||||
choose {
|
||||
when(TLogRejoinReply rep =
|
||||
wait(brokenPromiseToNever(self->dbInfo->get().master.tlogRejoin.getReply(req)))) {
|
||||
|
|
|
@ -47,7 +47,6 @@ using std::make_pair;
|
|||
using std::min;
|
||||
using std::max;
|
||||
|
||||
#define TLOG_VERSION "6.0"
|
||||
namespace oldTLog_6_0 {
|
||||
|
||||
struct TLogQueueEntryRef {
|
||||
|
@ -449,9 +448,7 @@ struct LogData : NonCopyable, public ReferenceCounted<LogData> {
|
|||
recoveryCount(), stopped(false), initialized(false), queueCommittingVersion(0), newPersistentDataVersion(invalidVersion), unrecoveredBefore(1), recoveredAt(1), unpoppedRecoveredTags(0),
|
||||
logRouterPopToVersion(0), locality(tagLocalityInvalid), execOpCommitInProgress(false)
|
||||
{
|
||||
std::map<std::string, std::string> details;
|
||||
details["TLogVersion"] = TLOG_VERSION;
|
||||
startRole(Role::TRANSACTION_LOG, interf.id(), tLogData->workerID, details, context);
|
||||
startRole(Role::TRANSACTION_LOG, interf.id(), tLogData->workerID, {{"SharedTLog", tLogData->dbgid.shortString()}}, context);
|
||||
|
||||
persistentDataVersion.init(LiteralStringRef("TLog.PersistentDataVersion"), cc.id);
|
||||
persistentDataDurableVersion.init(LiteralStringRef("TLog.PersistentDataDurableVersion"), cc.id);
|
||||
|
@ -1483,7 +1480,7 @@ ACTOR Future<Void> rejoinMasters( TLogData* self, TLogInterface tli, DBRecoveryC
|
|||
if ( self->dbInfo->get().master.id() != lastMasterID) {
|
||||
// The TLogRejoinRequest is needed to establish communications with a new master, which doesn't have our TLogInterface
|
||||
TLogRejoinRequest req(tli);
|
||||
TraceEvent("TLogRejoining", self->dbgid).detail("Master", self->dbInfo->get().master.id());
|
||||
TraceEvent("TLogRejoining", tli.id()).detail("Master", self->dbInfo->get().master.id());
|
||||
choose {
|
||||
when(TLogRejoinReply rep =
|
||||
wait(brokenPromiseToNever(self->dbInfo->get().master.tlogRejoin.getReply(req)))) {
|
||||
|
|
|
@ -47,8 +47,6 @@ using std::make_pair;
|
|||
using std::min;
|
||||
using std::max;
|
||||
|
||||
#define TLOG_VERSION "6.2"
|
||||
|
||||
struct TLogQueueEntryRef {
|
||||
UID id;
|
||||
Version version;
|
||||
|
@ -511,9 +509,7 @@ struct LogData : NonCopyable, public ReferenceCounted<LogData> {
|
|||
recoveryCount(), stopped(false), initialized(false), queueCommittingVersion(0), newPersistentDataVersion(invalidVersion), unrecoveredBefore(1), recoveredAt(1), unpoppedRecoveredTags(0),
|
||||
logRouterPopToVersion(0), locality(tagLocalityInvalid), execOpCommitInProgress(false)
|
||||
{
|
||||
std::map<std::string, std::string> details;
|
||||
details["TLogVersion"] = TLOG_VERSION;
|
||||
startRole(Role::TRANSACTION_LOG, interf.id(), tLogData->workerID, details, context);
|
||||
startRole(Role::TRANSACTION_LOG, interf.id(), tLogData->workerID, {{"SharedTLog", tLogData->dbgid.shortString()}}, context);
|
||||
|
||||
persistentDataVersion.init(LiteralStringRef("TLog.PersistentDataVersion"), cc.id);
|
||||
persistentDataDurableVersion.init(LiteralStringRef("TLog.PersistentDataDurableVersion"), cc.id);
|
||||
|
@ -1876,7 +1872,7 @@ ACTOR Future<Void> rejoinMasters( TLogData* self, TLogInterface tli, DBRecoveryC
|
|||
if ( self->dbInfo->get().master.id() != lastMasterID) {
|
||||
// The TLogRejoinRequest is needed to establish communications with a new master, which doesn't have our TLogInterface
|
||||
TLogRejoinRequest req(tli);
|
||||
TraceEvent("TLogRejoining", self->dbgid).detail("Master", self->dbInfo->get().master.id());
|
||||
TraceEvent("TLogRejoining", tli.id()).detail("Master", self->dbInfo->get().master.id());
|
||||
choose {
|
||||
when(TLogRejoinReply rep =
|
||||
wait(brokenPromiseToNever(self->dbInfo->get().master.tlogRejoin.getReply(req)))) {
|
||||
|
|
|
@ -418,7 +418,7 @@ private:
|
|||
}
|
||||
};
|
||||
|
||||
void startRole(const Role &role, UID roleId, UID workerId, std::map<std::string, std::string> details = std::map<std::string, std::string>(), std::string origination = "Recruited");
|
||||
void startRole(const Role &role, UID roleId, UID workerId, const std::map<std::string, std::string> &details = std::map<std::string, std::string>(), const std::string &origination = "Recruited");
|
||||
void endRole(const Role &role, UID id, std::string reason, bool ok = true, Error e = Error());
|
||||
|
||||
struct ServerDBInfo;
|
||||
|
|
|
@ -618,7 +618,7 @@ Standalone<StringRef> roleString(std::set<std::pair<std::string, std::string>> r
|
|||
return StringRef(result);
|
||||
}
|
||||
|
||||
void startRole(const Role &role, UID roleId, UID workerId, std::map<std::string, std::string> details, std::string origination) {
|
||||
void startRole(const Role &role, UID roleId, UID workerId, const std::map<std::string, std::string> &details, const std::string &origination) {
|
||||
if(role.includeInTraceRoles) {
|
||||
addTraceRole(role.abbreviation);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue