You've already forked mariadb-columnstore-engine
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:
@@ -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,47 +1005,25 @@ 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)
|
t.join();
|
||||||
{
|
// read the response
|
||||||
// make sure the thread is waiting for the rest of the data
|
err = ::recv(sessionSock, buf, 1024, MSG_DONTWAIT);
|
||||||
// then kill the connection. This will trigger the task thread
|
sm_response *resp = (sm_response *) buf;
|
||||||
// to exit on an error handling path
|
assert(err == sizeof(sm_response));
|
||||||
sleep(1);
|
assert(resp->header.type == SM_MSG_START);
|
||||||
close(sessionSock);
|
assert(resp->header.payloadLen == sizeof(ssize_t));
|
||||||
close(clientSock);
|
assert(resp->header.flags == 0);
|
||||||
err = ::recv(sessionSock, buf, 1024, MSG_DONTWAIT);
|
assert(resp->returnCode == 0);
|
||||||
assert(err == -1);
|
|
||||||
t.join();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
t.join();
|
|
||||||
// read the response
|
|
||||||
err = ::recv(sessionSock, buf, 1024, MSG_DONTWAIT);
|
|
||||||
sm_response *resp = (sm_response *) buf;
|
|
||||||
assert(err == sizeof(sm_response));
|
|
||||||
assert(resp->header.type == SM_MSG_START);
|
|
||||||
assert(resp->header.payloadLen == sizeof(ssize_t));
|
|
||||||
assert(resp->header.flags == 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();
|
||||||
|
Reference in New Issue
Block a user