Merge branch 'release-6.2' into release-6.3
# Conflicts: # cmake/CompileBoost.cmake # fdbserver/DataDistribution.actor.cpp # fdbserver/fdbserver.actor.cpp # flow/Error.cpp
This commit is contained in:
commit
f4c9b88908
|
@ -2,6 +2,10 @@
|
|||
Release Notes
|
||||
#############
|
||||
|
||||
6.2.31
|
||||
======
|
||||
* Fix a rare invalid memory access on data distributor when snapshotting large clusters. This is a follow up to `PR #4076 <https://github.com/apple/foundationdb/pull/4076>`_. `(PR #4317) <https://github.com/apple/foundationdb/pull/4317>`_
|
||||
|
||||
6.2.30
|
||||
======
|
||||
* A storage server which has fallen behind will deprioritize reads in order to catch up. This change causes some saturating workloads to experience high read latencies instead of high GRV latencies. `(PR #4218) <https://github.com/apple/foundationdb/pull/4218>`_
|
||||
|
|
|
@ -237,7 +237,7 @@ ACTOR Future<Void> dataDistributionTracker(Reference<InitialDataDistribution> in
|
|||
FutureStream<Promise<int64_t>> getAverageShardBytes,
|
||||
Promise<Void> readyToStart, Reference<AsyncVar<bool>> anyZeroHealthyTeams,
|
||||
UID distributorId, KeyRangeMap<ShardTrackedData>* shards,
|
||||
bool const* trackerCancelled);
|
||||
bool* trackerCancelled);
|
||||
|
||||
ACTOR Future<Void> dataDistributionQueue(
|
||||
Database cx, PromiseStream<RelocateShard> output, FutureStream<RelocateShard> input,
|
||||
|
|
|
@ -94,7 +94,7 @@ struct DataDistributionTracker {
|
|||
// The reference to trackerCancelled must be extracted by actors,
|
||||
// because by the time (trackerCancelled == true) this memory cannot
|
||||
// be accessed
|
||||
bool const& trackerCancelled;
|
||||
bool& trackerCancelled;
|
||||
|
||||
// This class extracts the trackerCancelled reference from a DataDistributionTracker object
|
||||
// Because some actors spawned by the dataDistributionTracker outlive the DataDistributionTracker
|
||||
|
@ -123,7 +123,7 @@ struct DataDistributionTracker {
|
|||
PromiseStream<RelocateShard> const& output,
|
||||
Reference<ShardsAffectedByTeamFailure> shardsAffectedByTeamFailure,
|
||||
Reference<AsyncVar<bool>> anyZeroHealthyTeams, KeyRangeMap<ShardTrackedData>& shards,
|
||||
bool const& trackerCancelled)
|
||||
bool& trackerCancelled)
|
||||
: cx(cx), distributorId(distributorId), dbSizeEstimate(new AsyncVar<int64_t>()), systemSizeEstimate(0),
|
||||
maxShardSize(new AsyncVar<Optional<int64_t>>()), sizeChanges(false), readyToStart(readyToStart), output(output),
|
||||
shardsAffectedByTeamFailure(shardsAffectedByTeamFailure), anyZeroHealthyTeams(anyZeroHealthyTeams),
|
||||
|
@ -131,6 +131,7 @@ struct DataDistributionTracker {
|
|||
|
||||
~DataDistributionTracker()
|
||||
{
|
||||
trackerCancelled = true;
|
||||
//Cancel all actors so they aren't waiting on sizeChanged broken promise
|
||||
sizeChanges.clear(false);
|
||||
}
|
||||
|
@ -901,7 +902,7 @@ ACTOR Future<Void> dataDistributionTracker(Reference<InitialDataDistribution> in
|
|||
FutureStream<Promise<int64_t>> getAverageShardBytes,
|
||||
Promise<Void> readyToStart, Reference<AsyncVar<bool>> anyZeroHealthyTeams,
|
||||
UID distributorId, KeyRangeMap<ShardTrackedData>* shards,
|
||||
bool const* trackerCancelled) {
|
||||
bool* trackerCancelled) {
|
||||
state DataDistributionTracker self(cx, distributorId, readyToStart, output, shardsAffectedByTeamFailure,
|
||||
anyZeroHealthyTeams, *shards, *trackerCancelled);
|
||||
state Future<Void> loggingTrigger = Void();
|
||||
|
|
|
@ -1562,6 +1562,9 @@ int main(int argc, char* argv[]) {
|
|||
delete FLOW_KNOBS;
|
||||
delete SERVER_KNOBS;
|
||||
delete CLIENT_KNOBS;
|
||||
FLOW_KNOBS = nullptr;
|
||||
SERVER_KNOBS = nullptr;
|
||||
CLIENT_KNOBS = nullptr;
|
||||
FlowKnobs* flowKnobs = new FlowKnobs;
|
||||
ClientKnobs* clientKnobs = new ClientKnobs;
|
||||
ServerKnobs* serverKnobs = new ServerKnobs;
|
||||
|
|
|
@ -91,13 +91,25 @@ Error internal_error_impl(const char* a_nm, long long a, const char * op_nm, con
|
|||
return Error(error_code_internal_error);
|
||||
}
|
||||
|
||||
Error::Error(int error_code)
|
||||
: error_code(error_code), flags(0)
|
||||
{
|
||||
Error::Error(int error_code) : error_code(error_code), flags(0) {
|
||||
if (TRACE_SAMPLE()) TraceEvent(SevSample, "ErrorCreated").detail("ErrorCode", error_code);
|
||||
//std::cout << "Error: " << error_code << std::endl;
|
||||
// std::cout << "Error: " << error_code << std::endl;
|
||||
if (error_code >= 3000 && error_code < 6000) {
|
||||
TraceEvent(SevError, "SystemError").error(*this).backtrace();
|
||||
{
|
||||
TraceEvent te(SevError, "SystemError");
|
||||
te.error(*this).backtrace();
|
||||
if (error_code == error_code_unknown_error) {
|
||||
auto exception = std::current_exception();
|
||||
if (exception) {
|
||||
try {
|
||||
std::rethrow_exception(exception);
|
||||
} catch (std::exception& e) {
|
||||
te.detail("StdException", e.what());
|
||||
} catch (...) {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (g_crashOnError) {
|
||||
flushOutputStreams();
|
||||
flushTraceFileVoid();
|
||||
|
|
|
@ -919,7 +919,7 @@ bool TraceEvent::init() {
|
|||
detail("Severity", int(severity));
|
||||
detail("Time", "0.000000");
|
||||
timeIndex = fields.size() - 1;
|
||||
if (FLOW_KNOBS->TRACE_DATETIME_ENABLED) {
|
||||
if (FLOW_KNOBS && FLOW_KNOBS->TRACE_DATETIME_ENABLED) {
|
||||
detail("DateTime", "");
|
||||
}
|
||||
|
||||
|
@ -1142,7 +1142,7 @@ void TraceEvent::log() {
|
|||
if (enabled) {
|
||||
double time = TraceEvent::getCurrentTime();
|
||||
fields.mutate(timeIndex).second = format("%.6f", time);
|
||||
if (FLOW_KNOBS->TRACE_DATETIME_ENABLED) {
|
||||
if (FLOW_KNOBS && FLOW_KNOBS->TRACE_DATETIME_ENABLED) {
|
||||
fields.mutate(timeIndex + 1).second = TraceEvent::printRealTime(time);
|
||||
}
|
||||
|
||||
|
@ -1317,7 +1317,7 @@ void TraceBatch::dump() {
|
|||
TraceBatch::EventInfo::EventInfo(double time, const char *name, uint64_t id, const char *location) {
|
||||
fields.addField("Severity", format("%d", (int)SevInfo));
|
||||
fields.addField("Time", format("%.6f", time));
|
||||
if (FLOW_KNOBS->TRACE_DATETIME_ENABLED) {
|
||||
if (FLOW_KNOBS && FLOW_KNOBS->TRACE_DATETIME_ENABLED) {
|
||||
fields.addField("DateTime", TraceEvent::printRealTime(time));
|
||||
}
|
||||
fields.addField("Type", name);
|
||||
|
@ -1328,7 +1328,7 @@ TraceBatch::EventInfo::EventInfo(double time, const char *name, uint64_t id, con
|
|||
TraceBatch::AttachInfo::AttachInfo(double time, const char *name, uint64_t id, uint64_t to) {
|
||||
fields.addField("Severity", format("%d", (int)SevInfo));
|
||||
fields.addField("Time", format("%.6f", time));
|
||||
if (FLOW_KNOBS->TRACE_DATETIME_ENABLED) {
|
||||
if (FLOW_KNOBS && FLOW_KNOBS->TRACE_DATETIME_ENABLED) {
|
||||
fields.addField("DateTime", TraceEvent::printRealTime(time));
|
||||
}
|
||||
fields.addField("Type", name);
|
||||
|
@ -1339,7 +1339,7 @@ TraceBatch::AttachInfo::AttachInfo(double time, const char *name, uint64_t id, u
|
|||
TraceBatch::BuggifyInfo::BuggifyInfo(double time, int activated, int line, std::string file) {
|
||||
fields.addField("Severity", format("%d", (int)SevInfo));
|
||||
fields.addField("Time", format("%.6f", time));
|
||||
if (FLOW_KNOBS->TRACE_DATETIME_ENABLED) {
|
||||
if (FLOW_KNOBS && FLOW_KNOBS->TRACE_DATETIME_ENABLED) {
|
||||
fields.addField("DateTime", TraceEvent::printRealTime(time));
|
||||
}
|
||||
fields.addField("Type", "BuggifySection");
|
||||
|
|
Loading…
Reference in New Issue