mirror of
https://github.com/XRPLF/clio.git
synced 2025-11-04 03:45:50 +00:00
Merge branch 'develop' into clang_tidy/autofix-1757582933
This commit is contained in:
@@ -104,12 +104,24 @@ It is implicitly used when running `conan` commands, you don't need to specify i
|
||||
|
||||
You have to update this file every time you add a new dependency or change a revision or version of an existing dependency.
|
||||
|
||||
To do that, run the following command in the repository root:
|
||||
> [!NOTE]
|
||||
> Conan uses local cache by default when creating a lockfile.
|
||||
>
|
||||
> To ensure, that lockfile creation works the same way on all developer machines, you should clear the local cache before creating a new lockfile.
|
||||
|
||||
To create a new lockfile, run the following commands in the repository root:
|
||||
|
||||
```bash
|
||||
conan remove '*' --confirm
|
||||
rm conan.lock
|
||||
# This ensure that xrplf remote is the first to be consulted
|
||||
conan remote add --force --index 0 xrplf https://conan.ripplex.io
|
||||
conan lock create .
|
||||
```
|
||||
|
||||
> [!NOTE]
|
||||
> If some dependencies are exclusive for some OS, you may need to run the last command for them adding `--profile:all <PROFILE>`.
|
||||
|
||||
## Building Clio
|
||||
|
||||
1. Navigate to Clio's root directory and run:
|
||||
|
||||
@@ -305,6 +305,8 @@ ETLService::startLoading(uint32_t seq)
|
||||
{
|
||||
ASSERT(not state_->isStrictReadonly, "This should only happen on writer nodes");
|
||||
taskMan_ = taskManagerProvider_->make(ctx_, *monitor_, seq, finishSequence_);
|
||||
|
||||
// FIXME: this legacy name "extractor_threads" is no longer accurate (we have coroutines now)
|
||||
taskMan_->run(config_.get().get<std::size_t>("extractor_threads"));
|
||||
}
|
||||
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#include "etlng/SchedulerInterface.hpp"
|
||||
#include "etlng/impl/Monitor.hpp"
|
||||
#include "etlng/impl/TaskQueue.hpp"
|
||||
#include "util/Assert.hpp"
|
||||
#include "util/Constants.hpp"
|
||||
#include "util/LedgerUtils.hpp"
|
||||
#include "util/Profiler.hpp"
|
||||
@@ -70,11 +71,10 @@ TaskManager::~TaskManager()
|
||||
void
|
||||
TaskManager::run(std::size_t numExtractors)
|
||||
{
|
||||
LOG(log_.debug()) << "Starting task manager with " << numExtractors << " extractors...\n";
|
||||
ASSERT(not running_, "TaskManager can only be started once");
|
||||
running_ = true;
|
||||
|
||||
stop();
|
||||
extractors_.clear();
|
||||
loaders_.clear();
|
||||
LOG(log_.debug()) << "Starting task manager with " << numExtractors << " extractors...\n";
|
||||
|
||||
extractors_.reserve(numExtractors);
|
||||
for ([[maybe_unused]] auto _ : std::views::iota(0uz, numExtractors))
|
||||
@@ -157,7 +157,8 @@ TaskManager::spawnLoader(TaskQueue& queue)
|
||||
monitor_.get().notifySequenceLoaded(data->seq);
|
||||
} else {
|
||||
// TODO (https://github.com/XRPLF/clio/issues/1852) this is probably better done with a timeout (on
|
||||
// coroutine) so that the thread itself is not blocked
|
||||
// coroutine) so that the thread itself is not blocked. for now this implies that the context
|
||||
// (io_threads) needs at least 2 threads
|
||||
queue.awaitTask();
|
||||
}
|
||||
}
|
||||
@@ -178,6 +179,8 @@ TaskManager::wait()
|
||||
void
|
||||
TaskManager::stop()
|
||||
{
|
||||
ASSERT(running_, "TaskManager is not running");
|
||||
|
||||
for (auto& extractor : extractors_)
|
||||
extractor.abort();
|
||||
for (auto& loader : loaders_)
|
||||
|
||||
@@ -56,6 +56,7 @@ class TaskManager : public TaskManagerInterface {
|
||||
std::vector<util::async::AnyOperation<void>> extractors_;
|
||||
std::vector<util::async::AnyOperation<void>> loaders_;
|
||||
|
||||
std::atomic_bool running_ = false;
|
||||
util::Logger log_{"ETL"};
|
||||
|
||||
public:
|
||||
|
||||
Reference in New Issue
Block a user