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
feat(SM): MCOL-5785 Add timeout options for S3Storage (#3265)
* Update libmarias3 fix build with the recent libmarias3 * feat(SM): MCOL-5785 Add timeout options for S3Storage In some unfortunate situations StorageManager may get stuck on network operations. This commit adds the ability to set network timeouts which will help to ensure that the system is more responsive. * feat(SM): MCOL-5785 Add smps & smkill tools * `smps` shows all active S3 network operations * `smkill` terminates S3 network operations NB! At the moment smkill is able to terminate operations that are stuck on retries, but not hang inside the libcurl call. In other words if you want to terminate all operations you should configure `connect_timeout` & `timeout` --------- Co-authored-by: Leonid Fedorov <leonid.fedorov@mariadb.com>
This commit is contained in:
committed by
GitHub
parent
f36ca611eb
commit
c22409760f
@ -16,6 +16,7 @@
|
||||
MA 02110-1301, USA. */
|
||||
|
||||
#include "SMComm.h"
|
||||
#include "bytestream.h"
|
||||
#include "messageFormat.h"
|
||||
|
||||
using namespace std;
|
||||
@ -277,4 +278,45 @@ int SMComm::copyFile(const string& file1, const string& file2)
|
||||
common_exit(command, response, err);
|
||||
}
|
||||
|
||||
int SMComm::listIOTasks(vector<storagemanager::list_iotask_resp_entry>* entries)
|
||||
{
|
||||
ByteStream* command = buffers.getByteStream();
|
||||
ByteStream* response = buffers.getByteStream();
|
||||
ssize_t err;
|
||||
|
||||
*command << (uint8_t)storagemanager::LIST_IOTASKS;
|
||||
err = sockets.send_recv(*command, response);
|
||||
if (err)
|
||||
common_exit(command, response, err);
|
||||
check_for_error(command, response, err);
|
||||
|
||||
uint32_t numElements;
|
||||
entries->clear();
|
||||
*response >> numElements;
|
||||
entries->reserve(numElements);
|
||||
while (numElements > 0)
|
||||
{
|
||||
storagemanager::list_iotask_resp_entry entry;
|
||||
*response >> entry.id >> entry.runningTime;
|
||||
entries->push_back(std::move(entry));
|
||||
--numElements;
|
||||
}
|
||||
|
||||
common_exit(command, response, err);
|
||||
}
|
||||
|
||||
int SMComm::killIOTask(uint64_t id)
|
||||
{
|
||||
ByteStream* command = buffers.getByteStream();
|
||||
ByteStream* response = buffers.getByteStream();
|
||||
ssize_t err;
|
||||
|
||||
*command << (uint8_t)storagemanager::TERMINATE_IOTASK << id;
|
||||
err = sockets.send_recv(*command, response);
|
||||
if (err)
|
||||
common_exit(command, response, err);
|
||||
check_for_error(command, response, err);
|
||||
common_exit(command, response, err);
|
||||
}
|
||||
|
||||
} // namespace idbdatafile
|
||||
|
Reference in New Issue
Block a user