diff options
| author | Dan Engelbrecht <[email protected]> | 2024-04-20 13:22:05 +0200 |
|---|---|---|
| committer | GitHub Enterprise <[email protected]> | 2024-04-20 13:22:05 +0200 |
| commit | aa0b0d3cbfc6c4561591df856396703f7177292e (patch) | |
| tree | 6ff9a4e94559ba62d8ee07076d56dedc7d2e9115 /src/zenutil/zenserverprocess.cpp | |
| parent | 5.4.5-pre0 (diff) | |
| download | zen-aa0b0d3cbfc6c4561591df856396703f7177292e.tar.xz zen-aa0b0d3cbfc6c4561591df856396703f7177292e.zip | |
import oplog improvements (#54)
* report down/up transfer speed during progress
* add disk buffering in http client
* offload block decoding and chunk writing form network worker pool threads
add block hash verification for blocks recevied at oplog import
* separate download-latch from write-latch to get more accurate download speed
* check headers when downloading with http client to go directly to file writing for large payloads
* we must clear write callback even if we only provide it as an argument to the Download() call
* make timeout optional in AddSponsorProcess
* check return codes when creating windows threadpool
Diffstat (limited to 'src/zenutil/zenserverprocess.cpp')
| -rw-r--r-- | src/zenutil/zenserverprocess.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/zenutil/zenserverprocess.cpp b/src/zenutil/zenserverprocess.cpp index f5bc088a5..34eec9790 100644 --- a/src/zenutil/zenserverprocess.cpp +++ b/src/zenutil/zenserverprocess.cpp @@ -403,7 +403,7 @@ ZenServerState::ZenServerEntry::IsReady() const } bool -ZenServerState::ZenServerEntry::AddSponsorProcess(uint32_t PidToAdd) +ZenServerState::ZenServerEntry::AddSponsorProcess(uint32_t PidToAdd, uint64_t Timeout) { uint32_t ServerPid = Pid.load(); auto WaitForPickup = [&](uint32_t AddedSlotIndex) { @@ -427,13 +427,13 @@ ZenServerState::ZenServerEntry::AddSponsorProcess(uint32_t PidToAdd) { if (SponsorPids[SponsorIndex].load(std::memory_order_relaxed) == PidToAdd) { - return WaitForPickup(SponsorIndex); + return Timeout == 0 ? true : WaitForPickup(SponsorIndex); } uint32_t Expected = 0; if (SponsorPids[SponsorIndex].compare_exchange_strong(Expected, PidToAdd)) { // Success! - return WaitForPickup(SponsorIndex); + return Timeout == 0 ? true : WaitForPickup(SponsorIndex); } } @@ -865,6 +865,8 @@ ZenServerInstance::OnServerReady() m_BasePort = Entry->EffectiveListenPort; CreateShutdownEvent(m_BasePort); + + ZEN_DEBUG("Server '{}' is ready on port {}", m_Name, m_BasePort); } std::string |