1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-08-07 03:22:57 +03:00

MCOL-3563: Add printouts directing user to check log files.

This commit is contained in:
benthompson15
2019-12-03 13:59:41 -06:00
parent 0ae4969a4d
commit ce39332e8b

View File

@@ -996,7 +996,7 @@ bool listdirtask(bool connectionTest=false)
return true; return true;
} }
void pingtask(bool connectionTest=false) void pingtask()
{ {
int err=0; int err=0;
uint8_t buf[1024]; uint8_t buf[1024];
@@ -1005,37 +1005,16 @@ void pingtask(bool connectionTest=false)
size_t len = sizeof(*cmd); size_t len = sizeof(*cmd);
// set payload to be shorter than actual message lengh
// and send a shortened message.
if (connectionTest)
len -= 2;
ssize_t result = ::write(sessionSock, cmd, sizeof(*cmd)); ssize_t result = ::write(sessionSock, cmd, sizeof(*cmd));
assert(result==(sizeof(*cmd))); assert(result==(sizeof(*cmd)));
// set payload to be correct length again
if (connectionTest)
len += 2;
// process task will look for the full length and // process task will look for the full length and
// will wait on the rest of the message. // will wait on the rest of the message.
// don't test connection loss here since this message is only 1 byte
ProcessTask pt(clientSock, len); ProcessTask pt(clientSock, len);
boost::thread t(pt); boost::thread t(pt);
if (connectionTest)
{
// make sure the thread is waiting for the rest of the data
// then kill the connection. This will trigger the task thread
// to exit on an error handling path
sleep(1);
close(sessionSock);
close(clientSock);
err = ::recv(sessionSock, buf, 1024, MSG_DONTWAIT);
assert(err == -1);
t.join();
}
else
{
t.join(); t.join();
// read the response // read the response
err = ::recv(sessionSock, buf, 1024, MSG_DONTWAIT); err = ::recv(sessionSock, buf, 1024, MSG_DONTWAIT);
@@ -1045,7 +1024,6 @@ void pingtask(bool connectionTest=false)
assert(resp->header.payloadLen == sizeof(ssize_t)); assert(resp->header.payloadLen == sizeof(ssize_t));
assert(resp->header.flags == 0); assert(resp->header.flags == 0);
assert(resp->returnCode == 0); assert(resp->returnCode == 0);
}
cout << "pingtask OK" << endl; cout << "pingtask OK" << endl;
} }
@@ -1994,21 +1972,29 @@ int main(int argc, char* argv[])
metadataJournalTestCleanup(); metadataJournalTestCleanup();
cout << " DONE" << endl; cout << " DONE" << endl;
cout << "Testing connection loss..." << endl; cout << "Testing connection loss..." << endl << endl;
cout << "Check log files for lines:" << endl;
cout << "[NameTask read] caught an error: Bad file descriptor." << endl;
cout << "****** socket error!" << endl;
cout << "PosixTask::consumeMsg(): Discarding the tail end of a partial msg." << endl << endl;
//opentask(); //opentask();
cout << "OpenTask read2 connection test " << endl;
opentask(true); opentask(true);
makeConnection(); makeConnection();
cout << "UnlinkTask read connection test " << endl;
unlinktask(true); unlinktask(true);
makeConnection(); makeConnection();
cout << "StatTask read connection test " << endl;
stattask(true); stattask(true);
makeConnection(); makeConnection();
cout << "TruncateTask read connection test " << endl;
truncatetask(true); truncatetask(true);
makeConnection(); makeConnection();
cout << "ListDirextoryTask read connection test " << endl;
listdirtask(true); listdirtask(true);
makeConnection(); makeConnection();
pingtask(true); cout << "CopyTask read connection test " << endl;
makeConnection();
copytask(true); copytask(true);
(Cache::get())->shutdown(); (Cache::get())->shutdown();