Merge remote-tracking branch 'upstream/release-5.2' into master-release-5.2-merge

This commit is contained in:
Alec Grieser 2018-03-19 12:34:50 -07:00
commit 551ea9c7f8
No known key found for this signature in database
GPG Key ID: CAF63551C60D3462
9 changed files with 18 additions and 18 deletions

View File

@ -1574,7 +1574,7 @@ ACTOR static Future<Void> doInstructions(Reference<FlowTesterData> data) {
try {
if(LOG_INSTRUCTIONS) {
if(op != LiteralStringRef("SWAP") && op != LiteralStringRef("PUSH")) {
printf("%lu. %s\n", idx, tupleToString(opTuple).c_str());
printf("%zu. %s\n", idx, tupleToString(opTuple).c_str());
fflush(stdout);
}
}

View File

@ -2583,7 +2583,7 @@ ACTOR Future<int> cli(CLIOptions opt, LineNoise* plinenoise) {
} else if(address_interface.size() == 1) {
printf("\nThe following address can be killed:\n");
} else {
printf("\nThe following %lu addresses can be killed:\n", address_interface.size());
printf("\nThe following %zu addresses can be killed:\n", address_interface.size());
}
for( auto it : address_interface ) {
printf("%s\n", printable(it.first).c_str());
@ -2596,7 +2596,7 @@ ACTOR Future<int> cli(CLIOptions opt, LineNoise* plinenoise) {
if (address_interface.size() == 0) {
printf("ERROR: no processes to kill. You must run the `kill command before running `kill all.\n");
} else {
printf("Attempted to kill %lu processes\n", address_interface.size());
printf("Attempted to kill %zu processes\n", address_interface.size());
}
} else {
for(int i = 1; i < tokens.size(); i++) {
@ -2611,7 +2611,7 @@ ACTOR Future<int> cli(CLIOptions opt, LineNoise* plinenoise) {
for(int i = 1; i < tokens.size(); i++) {
tr->set(LiteralStringRef("\xff\xff/reboot_worker"), address_interface[tokens[i]]);
}
printf("Attempted to kill %lu processes\n", tokens.size() - 1);
printf("Attempted to kill %zu processes\n", tokens.size() - 1);
}
}
continue;
@ -2807,7 +2807,7 @@ ACTOR Future<int> cli(CLIOptions opt, LineNoise* plinenoise) {
} else if(address_interface.size() == 1) {
printf("\nThe following address can be checked:\n");
} else {
printf("\nThe following %lu addresses can be checked:\n", address_interface.size());
printf("\nThe following %zu addresses can be checked:\n", address_interface.size());
}
for( auto it : address_interface ) {
printf("%s\n", printable(it.first).c_str());
@ -2820,7 +2820,7 @@ ACTOR Future<int> cli(CLIOptions opt, LineNoise* plinenoise) {
if (address_interface.size() == 0) {
printf("ERROR: no processes to check. You must run the `expensive_data_check command before running `expensive_data_check all.\n");
} else {
printf("Attempted to kill and check %lu processes\n", address_interface.size());
printf("Attempted to kill and check %zu processes\n", address_interface.size());
}
} else {
for(int i = 1; i < tokens.size(); i++) {
@ -2835,7 +2835,7 @@ ACTOR Future<int> cli(CLIOptions opt, LineNoise* plinenoise) {
for(int i = 1; i < tokens.size(); i++) {
tr->set(LiteralStringRef("\xff\xff/reboot_and_check_worker"), address_interface[tokens[i]]);
}
printf("Attempted to kill and check %lu processes\n", tokens.size() - 1);
printf("Attempted to kill and check %zu processes\n", tokens.size() - 1);
}
}
continue;

View File

@ -989,7 +989,7 @@ TEST_CASE("flow/flow/perf/actor patterns")
ASSERT(out2[i].isReady());
}
printf("2xcheeseActor(chooseTwoActor(cheeseActor(fifo), never)): %0.2f M/sec\n", N / 1e6 / (timer() - start));
printf("sizeof(CheeseWaitActorActor) == %lu\n", sizeof(CheeseWaitActorActor));
printf("sizeof(CheeseWaitActorActor) == %zu\n", sizeof(CheeseWaitActorActor));
}
{

View File

@ -79,7 +79,7 @@ bool testFuzzActor( Future<int>(*actor)(FutureStream<int> const&, PromiseStream<
}
}
if (outCount+1 != expectedOutput.size()) {
printf("\tERROR: %s output length incorrect: %d != expected %lu\n", desc, outCount+1, expectedOutput.size());
printf("\tERROR: %s output length incorrect: %d != expected %zu\n", desc, outCount+1, expectedOutput.size());
if (trial) printf("\t\tResult was inconsistent between runs!\n");
ok = false;
//return false;

View File

@ -94,8 +94,8 @@ int64_t getQueueSize( Standalone<StringRef> md ) {
double inputRoughness, durableRoughness;
int64_t inputBytes, durableBytes;
sscanf(extractAttribute(md.toString(), "bytesInput").c_str(), "%f %f %lld", &inputRate, &inputRoughness, &inputBytes);
sscanf(extractAttribute(md.toString(), "bytesDurable").c_str(), "%f %f %lld", &durableRate, &durableRoughness, &durableBytes);
sscanf(extractAttribute(md.toString(), "bytesInput").c_str(), "%lf %lf %lld", &inputRate, &inputRoughness, &inputBytes);
sscanf(extractAttribute(md.toString(), "bytesDurable").c_str(), "%lf %lf %lld", &durableRate, &durableRoughness, &durableBytes);
return inputBytes - durableBytes;
}

View File

@ -3414,7 +3414,7 @@ Possibilities:
void versionedMapTest() {
VersionedMap<int,int> vm;
printf("SS Ptree node is %lu bytes\n", sizeof( StorageServer::VersionedData::PTreeT ) );
printf("SS Ptree node is %zu bytes\n", sizeof( StorageServer::VersionedData::PTreeT ) );
const int NSIZE = sizeof(VersionedMap<int,int>::PTreeT);
const int ASIZE = NSIZE<=64 ? 64 : NextPowerOfTwo<NSIZE>::Result;

View File

@ -70,7 +70,7 @@ struct UnitTestWorkload : TestWorkload {
tests.push_back(t);
}
}
fprintf(stdout, "Found %d tests\n", tests.size());
fprintf(stdout, "Found %zu tests\n", tests.size());
g_random->randomShuffle(tests);
if (self->testRunLimit > 0 && tests.size() > self->testRunLimit)
tests.resize(self->testRunLimit);
@ -116,4 +116,4 @@ WorkloadFactory<UnitTestWorkload> UnitTestWorkloadFactory("UnitTests");
TEST_CASE("fdbserver/UnitTestWorkload/long delay") {
Void _ = wait(delay(60));
return Void();
}
}

View File

@ -701,7 +701,7 @@ void getDiskStatistics(std::string const& directory, uint64_t& currentIOs, uint6
disk_stream.ignore( std::numeric_limits<std::streamsize>::max(), '\n');
}
if(!g_network->isSimulated()) TraceEvent(SevWarnAlways, "GetDiskStatisticsDeviceNotFound").detail("Directory", directory);
if(!g_network->isSimulated()) TraceEvent(SevWarn, "GetDiskStatisticsDeviceNotFound").detail("Directory", directory);
}
dev_t getDeviceId(std::string path) {

View File

@ -1039,7 +1039,7 @@ void TraceBatch::dump() {
for(int i = 0; i < attachBatch.size(); i++) {
char buffer[256];
int length = sprintf(buffer, "<Event Severity=\"%d\" Time=\"%.6f\" Type=\"%s\" Machine=\"%d.%d.%d.%d:%d\" logGroup=\"%.*s\" ID=\"%016" PRIx64 "\" To=\"%016" PRIx64 "\"/>\r\n",
(int)SevInfo, attachBatch[i].time, attachBatch[i].name, (local.ip>>24)&0xff,(local.ip>>16)&0xff,(local.ip>>8)&0xff,local.ip&0xff,local.port, g_traceLog.logGroup.size(), g_traceLog.logGroup.data(),
(int)SevInfo, attachBatch[i].time, attachBatch[i].name, (local.ip>>24)&0xff,(local.ip>>16)&0xff,(local.ip>>8)&0xff,local.ip&0xff,local.port, (int)g_traceLog.logGroup.size(), g_traceLog.logGroup.data(),
attachBatch[i].id, attachBatch[i].to);
g_traceLog.write( buffer, length );
}
@ -1047,7 +1047,7 @@ void TraceBatch::dump() {
for(int i = 0; i < eventBatch.size(); i++) {
char buffer[256];
int length = sprintf(buffer, "<Event Severity=\"%d\" Time=\"%.6f\" Type=\"%s\" Machine=\"%d.%d.%d.%d:%d\" logGroup=\"%.*s\" ID=\"%016" PRIx64 "\" Location=\"%s\"/>\r\n",
(int)SevInfo, eventBatch[i].time, eventBatch[i].name, (local.ip>>24)&0xff,(local.ip>>16)&0xff,(local.ip>>8)&0xff,local.ip&0xff,local.port, g_traceLog.logGroup.size(), g_traceLog.logGroup.data(),
(int)SevInfo, eventBatch[i].time, eventBatch[i].name, (local.ip>>24)&0xff,(local.ip>>16)&0xff,(local.ip>>8)&0xff,local.ip&0xff,local.port, (int)g_traceLog.logGroup.size(), g_traceLog.logGroup.data(),
eventBatch[i].id, eventBatch[i].location );
g_traceLog.write( buffer, length );
}
@ -1055,7 +1055,7 @@ void TraceBatch::dump() {
for(int i = 0; i < buggifyBatch.size(); i++) {
char buffer[256];
int length = sprintf( buffer, "<Event Severity=\"%d\" Time=\"%.6f\" Type=\"BuggifySection\" Machine=\"%d.%d.%d.%d:%d\" logGroup=\"%.*s\" Activated=\"%d\" File=\"%s\" Line=\"%d\"/>\r\n",
(int)SevInfo, buggifyBatch[i].time, (local.ip>>24)&0xff,(local.ip>>16)&0xff,(local.ip>>8)&0xff,local.ip&0xff,local.port, g_traceLog.logGroup.size(), g_traceLog.logGroup.data(),
(int)SevInfo, buggifyBatch[i].time, (local.ip>>24)&0xff,(local.ip>>16)&0xff,(local.ip>>8)&0xff,local.ip&0xff,local.port, (int)g_traceLog.logGroup.size(), g_traceLog.logGroup.data(),
buggifyBatch[i].activated, buggifyBatch[i].file.c_str(), buggifyBatch[i].line );
g_traceLog.write( buffer, length );
}