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::min;
|
||||||
using std::max;
|
using std::max;
|
||||||
|
|
||||||
#define TLOG_VERSION "4.6"
|
|
||||||
namespace oldTLog_4_6 {
|
namespace oldTLog_4_6 {
|
||||||
|
|
||||||
typedef int16_t OldTag;
|
typedef int16_t OldTag;
|
||||||
|
@ -414,9 +413,7 @@ namespace oldTLog_4_6 {
|
||||||
// These are initialized differently on init() or recovery
|
// These are initialized differently on init() or recovery
|
||||||
recoveryCount(), stopped(false), initialized(false), queueCommittingVersion(0), newPersistentDataVersion(invalidVersion), recovery(Void())
|
recoveryCount(), stopped(false), initialized(false), queueCommittingVersion(0), newPersistentDataVersion(invalidVersion), recovery(Void())
|
||||||
{
|
{
|
||||||
std::map<std::string, std::string> details;
|
startRole(Role::TRANSACTION_LOG, interf.id(), tLogData->workerID, {{"SharedTLog", tLogData->dbgid.shortString()}}, "Restored");
|
||||||
details["TLogVersion"] = TLOG_VERSION;
|
|
||||||
startRole(Role::TRANSACTION_LOG, interf.id(), tLogData->workerID, details, "Restored");
|
|
||||||
|
|
||||||
persistentDataVersion.init(LiteralStringRef("TLog.PersistentDataVersion"), cc.id);
|
persistentDataVersion.init(LiteralStringRef("TLog.PersistentDataVersion"), cc.id);
|
||||||
persistentDataDurableVersion.init(LiteralStringRef("TLog.PersistentDataDurableVersion"), 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
|
// The TLogRejoinRequest is needed to establish communications with a new master, which doesn't have our TLogInterface
|
||||||
TLogRejoinRequest req;
|
TLogRejoinRequest req;
|
||||||
req.myInterface = tli;
|
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 {
|
choose {
|
||||||
when(TLogRejoinReply rep =
|
when(TLogRejoinReply rep =
|
||||||
wait(brokenPromiseToNever(self->dbInfo->get().master.tlogRejoin.getReply(req)))) {
|
wait(brokenPromiseToNever(self->dbInfo->get().master.tlogRejoin.getReply(req)))) {
|
||||||
|
|
|
@ -47,7 +47,6 @@ using std::make_pair;
|
||||||
using std::min;
|
using std::min;
|
||||||
using std::max;
|
using std::max;
|
||||||
|
|
||||||
#define TLOG_VERSION "6.0"
|
|
||||||
namespace oldTLog_6_0 {
|
namespace oldTLog_6_0 {
|
||||||
|
|
||||||
struct TLogQueueEntryRef {
|
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),
|
recoveryCount(), stopped(false), initialized(false), queueCommittingVersion(0), newPersistentDataVersion(invalidVersion), unrecoveredBefore(1), recoveredAt(1), unpoppedRecoveredTags(0),
|
||||||
logRouterPopToVersion(0), locality(tagLocalityInvalid), execOpCommitInProgress(false)
|
logRouterPopToVersion(0), locality(tagLocalityInvalid), execOpCommitInProgress(false)
|
||||||
{
|
{
|
||||||
std::map<std::string, std::string> details;
|
startRole(Role::TRANSACTION_LOG, interf.id(), tLogData->workerID, {{"SharedTLog", tLogData->dbgid.shortString()}}, context);
|
||||||
details["TLogVersion"] = TLOG_VERSION;
|
|
||||||
startRole(Role::TRANSACTION_LOG, interf.id(), tLogData->workerID, details, context);
|
|
||||||
|
|
||||||
persistentDataVersion.init(LiteralStringRef("TLog.PersistentDataVersion"), cc.id);
|
persistentDataVersion.init(LiteralStringRef("TLog.PersistentDataVersion"), cc.id);
|
||||||
persistentDataDurableVersion.init(LiteralStringRef("TLog.PersistentDataDurableVersion"), 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) {
|
if ( self->dbInfo->get().master.id() != lastMasterID) {
|
||||||
// The TLogRejoinRequest is needed to establish communications with a new master, which doesn't have our TLogInterface
|
// The TLogRejoinRequest is needed to establish communications with a new master, which doesn't have our TLogInterface
|
||||||
TLogRejoinRequest req(tli);
|
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 {
|
choose {
|
||||||
when(TLogRejoinReply rep =
|
when(TLogRejoinReply rep =
|
||||||
wait(brokenPromiseToNever(self->dbInfo->get().master.tlogRejoin.getReply(req)))) {
|
wait(brokenPromiseToNever(self->dbInfo->get().master.tlogRejoin.getReply(req)))) {
|
||||||
|
|
|
@ -47,8 +47,6 @@ using std::make_pair;
|
||||||
using std::min;
|
using std::min;
|
||||||
using std::max;
|
using std::max;
|
||||||
|
|
||||||
#define TLOG_VERSION "6.2"
|
|
||||||
|
|
||||||
struct TLogQueueEntryRef {
|
struct TLogQueueEntryRef {
|
||||||
UID id;
|
UID id;
|
||||||
Version version;
|
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),
|
recoveryCount(), stopped(false), initialized(false), queueCommittingVersion(0), newPersistentDataVersion(invalidVersion), unrecoveredBefore(1), recoveredAt(1), unpoppedRecoveredTags(0),
|
||||||
logRouterPopToVersion(0), locality(tagLocalityInvalid), execOpCommitInProgress(false)
|
logRouterPopToVersion(0), locality(tagLocalityInvalid), execOpCommitInProgress(false)
|
||||||
{
|
{
|
||||||
std::map<std::string, std::string> details;
|
startRole(Role::TRANSACTION_LOG, interf.id(), tLogData->workerID, {{"SharedTLog", tLogData->dbgid.shortString()}}, context);
|
||||||
details["TLogVersion"] = TLOG_VERSION;
|
|
||||||
startRole(Role::TRANSACTION_LOG, interf.id(), tLogData->workerID, details, context);
|
|
||||||
|
|
||||||
persistentDataVersion.init(LiteralStringRef("TLog.PersistentDataVersion"), cc.id);
|
persistentDataVersion.init(LiteralStringRef("TLog.PersistentDataVersion"), cc.id);
|
||||||
persistentDataDurableVersion.init(LiteralStringRef("TLog.PersistentDataDurableVersion"), 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) {
|
if ( self->dbInfo->get().master.id() != lastMasterID) {
|
||||||
// The TLogRejoinRequest is needed to establish communications with a new master, which doesn't have our TLogInterface
|
// The TLogRejoinRequest is needed to establish communications with a new master, which doesn't have our TLogInterface
|
||||||
TLogRejoinRequest req(tli);
|
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 {
|
choose {
|
||||||
when(TLogRejoinReply rep =
|
when(TLogRejoinReply rep =
|
||||||
wait(brokenPromiseToNever(self->dbInfo->get().master.tlogRejoin.getReply(req)))) {
|
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());
|
void endRole(const Role &role, UID id, std::string reason, bool ok = true, Error e = Error());
|
||||||
|
|
||||||
struct ServerDBInfo;
|
struct ServerDBInfo;
|
||||||
|
|
|
@ -618,7 +618,7 @@ Standalone<StringRef> roleString(std::set<std::pair<std::string, std::string>> r
|
||||||
return StringRef(result);
|
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) {
|
if(role.includeInTraceRoles) {
|
||||||
addTraceRole(role.abbreviation);
|
addTraceRole(role.abbreviation);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue