You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-29 08:21:15 +03:00
Fixed a bug in IDBPolicy that prevented using the system
w/o plugins. A couple other random things.
This commit is contained in:
@ -73,7 +73,6 @@ SMComm::SMComm()
|
|||||||
{
|
{
|
||||||
char buf[4096];
|
char buf[4096];
|
||||||
cwd = ::getcwd(buf, 4096);
|
cwd = ::getcwd(buf, 4096);
|
||||||
cout << "got cwd = " << cwd << endl;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SMComm::~SMComm()
|
SMComm::~SMComm()
|
||||||
|
@ -90,7 +90,8 @@ int SocketPool::send_recv(messageqcpp::ByteStream &in, messageqcpp::ByteStream *
|
|||||||
const uint8_t *inbuf = in.buf();
|
const uint8_t *inbuf = in.buf();
|
||||||
int err = 0;
|
int err = 0;
|
||||||
|
|
||||||
/* TODO: make these writes not send SIGPIPE */
|
/* TODO: make these writes not send SIGPIPE
|
||||||
|
TODO: turn at least the header bits into a single write */
|
||||||
err = ::write(sock, &storagemanager::SM_MSG_START, sizeof(storagemanager::SM_MSG_START));
|
err = ::write(sock, &storagemanager::SM_MSG_START, sizeof(storagemanager::SM_MSG_START));
|
||||||
sm_check_error;
|
sm_check_error;
|
||||||
err = ::write(sock, &length, sizeof(length));
|
err = ::write(sock, &length, sizeof(length));
|
||||||
@ -142,6 +143,8 @@ int SocketPool::send_recv(messageqcpp::ByteStream &in, messageqcpp::ByteStream *
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
assert(i == 0); // in testing there shouldn't be any garbage in the stream
|
||||||
|
|
||||||
if (length == 0) // didn't find the header yet
|
if (length == 0) // didn't find the header yet
|
||||||
{
|
{
|
||||||
// i == endOfData - 7 here
|
// i == endOfData - 7 here
|
||||||
@ -156,6 +159,9 @@ int SocketPool::send_recv(messageqcpp::ByteStream &in, messageqcpp::ByteStream *
|
|||||||
out->needAtLeast(length);
|
out->needAtLeast(length);
|
||||||
outbuf = out->getInputPtr();
|
outbuf = out->getInputPtr();
|
||||||
memcpy(outbuf, &window[startOfPayload], endOfData - startOfPayload);
|
memcpy(outbuf, &window[startOfPayload], endOfData - startOfPayload);
|
||||||
|
if (length < endOfData - startOfPayload)
|
||||||
|
cout << "SocketPool: warning! Probably got a bad length field! payload length = " << length <<
|
||||||
|
" endOfData = " << endOfData << " startOfPayload = " << startOfPayload << endl;
|
||||||
remainingBytes = length - (endOfData - startOfPayload); // remainingBytes is now the # of bytes left to read
|
remainingBytes = length - (endOfData - startOfPayload); // remainingBytes is now the # of bytes left to read
|
||||||
out->advanceInputPtr(endOfData - startOfPayload);
|
out->advanceInputPtr(endOfData - startOfPayload);
|
||||||
break; // done looking for the header, can fill the output buffer directly now.
|
break; // done looking for the header, can fill the output buffer directly now.
|
||||||
|
@ -132,7 +132,7 @@ IDBDataFile::Types IDBPolicy::getType( const std::string& path, Contexts ctxt )
|
|||||||
{
|
{
|
||||||
bool isLocal = isLocalFile( path );
|
bool isLocal = isLocalFile( path );
|
||||||
|
|
||||||
if (isLocal)
|
if (isLocal || (!useHdfs() && !useCloud()))
|
||||||
if (ctxt == PRIMPROC)
|
if (ctxt == PRIMPROC)
|
||||||
return IDBDataFile::UNBUFFERED;
|
return IDBDataFile::UNBUFFERED;
|
||||||
else
|
else
|
||||||
|
Reference in New Issue
Block a user