diff options
author | ilnurkh <ilnurkh@yandex-team.com> | 2023-10-17 08:15:44 +0300 |
---|---|---|
committer | ilnurkh <ilnurkh@yandex-team.com> | 2023-10-17 09:00:07 +0300 |
commit | 784925324fd115c37bc98c5bbfe64c15f9966d74 (patch) | |
tree | f763f6eaacfcd4757d249977aaddfa4e9b2a355b /library/cpp/actors/core | |
parent | d6c75d9ec33559b29eb61a8f2e17cbca30fd5ae2 (diff) | |
download | ydb-784925324fd115c37bc98c5bbfe64c15f9966d74.tar.gz |
Y_FAIL->Y_ABORT at '^li'
https://clubs.at.yandex-team.ru/arcadia/29404
Diffstat (limited to 'library/cpp/actors/core')
-rw-r--r-- | library/cpp/actors/core/actor_benchmark_helper.h | 2 | ||||
-rw-r--r-- | library/cpp/actors/core/actor_coroutine.cpp | 8 | ||||
-rw-r--r-- | library/cpp/actors/core/actor_virtual.h | 4 | ||||
-rw-r--r-- | library/cpp/actors/core/balancer.cpp | 2 | ||||
-rw-r--r-- | library/cpp/actors/core/config.h | 2 | ||||
-rw-r--r-- | library/cpp/actors/core/cpu_manager.cpp | 2 | ||||
-rw-r--r-- | library/cpp/actors/core/event.h | 8 | ||||
-rw-r--r-- | library/cpp/actors/core/event_local.h | 4 | ||||
-rw-r--r-- | library/cpp/actors/core/event_pb.h | 8 | ||||
-rw-r--r-- | library/cpp/actors/core/executor_pool_base.cpp | 2 | ||||
-rw-r--r-- | library/cpp/actors/core/executor_pool_basic.cpp | 4 | ||||
-rw-r--r-- | library/cpp/actors/core/executor_pool_united.cpp | 60 | ||||
-rw-r--r-- | library/cpp/actors/core/executor_thread.cpp | 28 | ||||
-rw-r--r-- | library/cpp/actors/core/interconnect.cpp | 2 | ||||
-rw-r--r-- | library/cpp/actors/core/invoke.h | 2 | ||||
-rw-r--r-- | library/cpp/actors/core/log.h | 2 | ||||
-rw-r--r-- | library/cpp/actors/core/mailbox.cpp | 14 | ||||
-rw-r--r-- | library/cpp/actors/core/mailbox.h | 4 | ||||
-rw-r--r-- | library/cpp/actors/core/scheduler_cookie.cpp | 8 |
19 files changed, 83 insertions, 83 deletions
diff --git a/library/cpp/actors/core/actor_benchmark_helper.h b/library/cpp/actors/core/actor_benchmark_helper.h index 0671271f42..c5dd09efe1 100644 --- a/library/cpp/actors/core/actor_benchmark_helper.h +++ b/library/cpp/actors/core/actor_benchmark_helper.h @@ -325,7 +325,7 @@ struct TActorBenchmark { } return setup; } - Y_FAIL(); + Y_ABORT(); } static double BenchSendReceive(bool allocation, NActors::TMailboxType::EType mType, EPoolType poolType, ESendingType sendingType) { diff --git a/library/cpp/actors/core/actor_coroutine.cpp b/library/cpp/actors/core/actor_coroutine.cpp index 9b0c81fa26..32390eaae3 100644 --- a/library/cpp/actors/core/actor_coroutine.cpp +++ b/library/cpp/actors/core/actor_coroutine.cpp @@ -67,7 +67,7 @@ namespace NActors { return nullptr; // it is not a race -- we've got timeout exactly for our current wait } } - Y_FAIL("no pending event"); + Y_ABORT("no pending event"); } bool TActorCoroImpl::ProcessEvent(THolder<IEventHandle> ev) { @@ -127,12 +127,12 @@ namespace NActors { Run(); } catch (const TDtorException& /*ex*/) { if (!AllowUnhandledDtor) { - Y_FAIL("unhandled TDtorException"); + Y_ABORT("unhandled TDtorException"); } } catch (const std::exception& ex) { - Y_FAIL("unhandled exception of type %s", TypeName(ex).data()); + Y_ABORT("unhandled exception of type %s", TypeName(ex).data()); } catch (...) { - Y_FAIL("unhandled exception of type not derived from std::exception"); + Y_ABORT("unhandled exception of type not derived from std::exception"); } } Finished = true; diff --git a/library/cpp/actors/core/actor_virtual.h b/library/cpp/actors/core/actor_virtual.h index 5598312952..78da45138d 100644 --- a/library/cpp/actors/core/actor_virtual.h +++ b/library/cpp/actors/core/actor_virtual.h @@ -70,7 +70,7 @@ public: } virtual bool SerializeToArcadiaStream(TChunkSerializer* /*serializer*/) const override { - Y_FAIL("Serialization of local event %s->%s", typeid(TEvent).name(), typeid(TActor).name()); + Y_ABORT("Serialization of local event %s->%s", typeid(TEvent).name(), typeid(TActor).name()); } virtual bool IsSerializable() const override { @@ -78,7 +78,7 @@ public: } static IEventBase* Load(TEventSerializedData*) { - Y_FAIL("Loading of local event %s->%s", typeid(TEvent).name(), typeid(TActor).name()); + Y_ABORT("Loading of local event %s->%s", typeid(TEvent).name(), typeid(TActor).name()); } }; diff --git a/library/cpp/actors/core/balancer.cpp b/library/cpp/actors/core/balancer.cpp index e09c834543..5e8a280a8b 100644 --- a/library/cpp/actors/core/balancer.cpp +++ b/library/cpp/actors/core/balancer.cpp @@ -294,7 +294,7 @@ namespace NActors { return; } } - Y_FAIL(); + Y_ABORT(); } void TBalancer::Unlock() { diff --git a/library/cpp/actors/core/config.h b/library/cpp/actors/core/config.h index 38aaf77797..7c843d0847 100644 --- a/library/cpp/actors/core/config.h +++ b/library/cpp/actors/core/config.h @@ -122,7 +122,7 @@ namespace NActors { return p.PoolName; } } - Y_FAIL("undefined pool id: %" PRIu32, (ui32)poolId); + Y_ABORT("undefined pool id: %" PRIu32, (ui32)poolId); } std::optional<ui32> GetThreadsOptional(ui32 poolId) const { diff --git a/library/cpp/actors/core/cpu_manager.cpp b/library/cpp/actors/core/cpu_manager.cpp index df4ea486e4..24b3161e3c 100644 --- a/library/cpp/actors/core/cpu_manager.cpp +++ b/library/cpp/actors/core/cpu_manager.cpp @@ -132,7 +132,7 @@ namespace NActors { return result; } } - Y_FAIL("missing PoolId: %d", int(poolId)); + Y_ABORT("missing PoolId: %d", int(poolId)); } TVector<IExecutorPool*> TCpuManager::GetBasicExecutorPools() const { diff --git a/library/cpp/actors/core/event.h b/library/cpp/actors/core/event.h index e7f561338f..3517dc7a68 100644 --- a/library/cpp/actors/core/event.h +++ b/library/cpp/actors/core/event.h @@ -75,7 +75,7 @@ namespace NActors { template <typename TEventType> TEventType* Get() { if (Type != TEventType::EventType) - Y_FAIL("Event type %" PRIu32 " doesn't match the expected type %" PRIu32, Type, TEventType::EventType); + Y_ABORT("Event type %" PRIu32 " doesn't match the expected type %" PRIu32, Type, TEventType::EventType); if (!Event) { static TEventSerializedData empty; @@ -86,7 +86,7 @@ namespace NActors { return static_cast<TEventType*>(Event.Get()); } - Y_FAIL("Failed to Load() event type %" PRIu32 " class %s", Type, TypeName<TEventType>().data()); + Y_ABORT("Failed to Load() event type %" PRIu32 " class %s", Type, TypeName<TEventType>().data()); } template <typename T> @@ -364,10 +364,10 @@ namespace NActors { return TString(header); \ } \ bool SerializeToArcadiaStream(NActors::TChunkSerializer*) const override { \ - Y_FAIL("Local event " #eventType " is not serializable"); \ + Y_ABORT("Local event " #eventType " is not serializable"); \ } \ static IEventBase* Load(NActors::TEventSerializedData*) { \ - Y_FAIL("Local event " #eventType " has no load method"); \ + Y_ABORT("Local event " #eventType " has no load method"); \ } \ bool IsSerializable() const override { \ return false; \ diff --git a/library/cpp/actors/core/event_local.h b/library/cpp/actors/core/event_local.h index 2845aa94dd..da0f740ba8 100644 --- a/library/cpp/actors/core/event_local.h +++ b/library/cpp/actors/core/event_local.h @@ -14,7 +14,7 @@ namespace NActors { } bool SerializeToArcadiaStream(TChunkSerializer* /*serializer*/) const override { - Y_FAIL("Serialization of local event %s type %" PRIu32, TypeName<TEv>().data(), TEventType); + Y_ABORT("Serialization of local event %s type %" PRIu32, TypeName<TEv>().data(), TEventType); } bool IsSerializable() const override { @@ -22,7 +22,7 @@ namespace NActors { } static IEventBase* Load(TEventSerializedData*) { - Y_FAIL("Loading of local event %s type %" PRIu32, TypeName<TEv>().data(), TEventType); + Y_ABORT("Loading of local event %s type %" PRIu32, TypeName<TEv>().data(), TEventType); } }; diff --git a/library/cpp/actors/core/event_pb.h b/library/cpp/actors/core/event_pb.h index d3b422f1dc..5fce7c830f 100644 --- a/library/cpp/actors/core/event_pb.h +++ b/library/cpp/actors/core/event_pb.h @@ -213,7 +213,7 @@ namespace NActors { if (const auto& info = input->GetSerializationInfo(); info.IsExtendedFormat) { // check marker if (!iter.Valid() || (*iter.ContiguousData() != PayloadMarker && *iter.ContiguousData() != ExtendedPayloadMarker)) { - Y_FAIL("invalid event"); + Y_ABORT("invalid event"); } const bool dataIsSeparate = *iter.ContiguousData() == ExtendedPayloadMarker; // ropes go after sizes @@ -232,7 +232,7 @@ namespace NActors { // parse number of payload ropes size_t numRopes = DeserializeNumber(iter, size); if (numRopes == Max<size_t>()) { - Y_FAIL("invalid event"); + Y_ABORT("invalid event"); } TStackVec<size_t, 16> ropeLens; if (dataIsSeparate) { @@ -242,7 +242,7 @@ namespace NActors { // parse length of the rope const size_t len = DeserializeNumber(iter, size); if (len == Max<size_t>() || size < len) { - Y_FAIL("invalid event len# %zu size# %" PRIu64, len, size); + Y_ABORT("invalid event len# %zu size# %" PRIu64, len, size); } // extract the rope if (dataIsSeparate) { @@ -259,7 +259,7 @@ namespace NActors { // parse the protobuf TRopeStream stream(iter, size); if (!ev->Record.ParseFromZeroCopyStream(&stream)) { - Y_FAIL("Failed to parse protobuf event type %" PRIu32 " class %s", TEventType, TypeName(ev->Record).data()); + Y_ABORT("Failed to parse protobuf event type %" PRIu32 " class %s", TEventType, TypeName(ev->Record).data()); } } ev->CachedByteSize = input->GetSize(); diff --git a/library/cpp/actors/core/executor_pool_base.cpp b/library/cpp/actors/core/executor_pool_base.cpp index d58cd6ce08..059cac48d2 100644 --- a/library/cpp/actors/core/executor_pool_base.cpp +++ b/library/cpp/actors/core/executor_pool_base.cpp @@ -206,7 +206,7 @@ namespace NActors { UnlockFromExecution((TMailboxTable::TTinyReadAsFilledMailbox*)mailbox, this, false, hint, MaxWorkers, ++revolvingWriteCounter); break; default: - Y_FAIL(); + Y_ABORT(); } NHPTimer::STime elapsed = GetCycleCountFast() - hpstart; diff --git a/library/cpp/actors/core/executor_pool_basic.cpp b/library/cpp/actors/core/executor_pool_basic.cpp index f9ea74a920..bb36fce894 100644 --- a/library/cpp/actors/core/executor_pool_basic.cpp +++ b/library/cpp/actors/core/executor_pool_basic.cpp @@ -352,7 +352,7 @@ namespace NActors { } break; default: - Y_FAIL(); + Y_ABORT(); } } } @@ -530,7 +530,7 @@ namespace NActors { pthread_t threadSelf = pthread_self(); sched_param param = {RealtimePriority}; if (pthread_setschedparam(threadSelf, SCHED_FIFO, ¶m)) { - Y_FAIL("Cannot set realtime priority"); + Y_ABORT("Cannot set realtime priority"); } } #else diff --git a/library/cpp/actors/core/executor_pool_united.cpp b/library/cpp/actors/core/executor_pool_united.cpp index a21fd2d1a7..960545ffb5 100644 --- a/library/cpp/actors/core/executor_pool_united.cpp +++ b/library/cpp/actors/core/executor_pool_united.cpp @@ -526,7 +526,7 @@ namespace NActors { FastWorkerSleep(GetCycleCountFast() + Config.SoftLimitTs); break; case Stopped: return false; - default: Y_FAIL(); + default: Y_ABORT(); } } } else if (wctx.Lease.IsNeverExpiring()) { // if idle-worker @@ -542,7 +542,7 @@ namespace NActors { idleTimer->Wait(); break; case Stopped: return false; - default: Y_FAIL(); + default: Y_ABORT(); } } else { // lease has expired and hard preemption occured, so we are executing in a slow-worker wctx.IncrementPreemptedEvents(); @@ -556,7 +556,7 @@ namespace NActors { idleTimer = nullptr; break; case Stopped: return false; - default: Y_FAIL(); + default: Y_ABORT(); } } } @@ -693,7 +693,7 @@ namespace NActors { return; } } else { - Y_FAIL("two slow-workers executing the same pool on the same core"); + Y_ABORT("two slow-workers executing the same pool on the same core"); return; // pool is already slow } } @@ -706,7 +706,7 @@ namespace NActors { void EndHardPreemption(TWorkerId to) { ATOMIC_COMPILER_BARRIER(); if (!AtomicCas(&CurrentLease, TLease(to, NeverExpire), HardPreemptionLease)) { - Y_FAIL("hard preemption failed"); + Y_ABORT("hard preemption failed"); } } @@ -717,7 +717,7 @@ namespace NActors { void EnablePreemptionAndGrant(TLease lease) { ATOMIC_COMPILER_BARRIER(); if (!AtomicCas(&CurrentLease, lease, lease.NeverExpire())) { - Y_FAIL("lease grant failed"); + Y_ABORT("lease grant failed"); } } @@ -789,7 +789,7 @@ namespace NActors { switch (ret) { case 0: return; case EINVAL: - Y_FAIL("sched_setscheduler(%" PRIu64 ", %d, %d) -> EINVAL", tid, policy, param.sched_priority); + Y_ABORT("sched_setscheduler(%" PRIu64 ", %d, %d) -> EINVAL", tid, policy, param.sched_priority); case EPERM: // Requirements: // * CAP_SYS_NICE capability to run real-time processes and set cpu affinity. @@ -802,11 +802,11 @@ namespace NActors { // echo -1 > /sys/fs/cgroup/cpu/[cgroup]/cpu.rt_runtime_us // (also set the same value for every parent cgroup) // https://www.kernel.org/doc/Documentation/scheduler/sched-rt-group.txt - Y_FAIL("sched_setscheduler(%" PRIu64 ", %d, %d) -> EPERM", tid, policy, param.sched_priority); + Y_ABORT("sched_setscheduler(%" PRIu64 ", %d, %d) -> EPERM", tid, policy, param.sched_priority); case ESRCH: - Y_FAIL("sched_setscheduler(%" PRIu64 ", %d, %d) -> ESRCH", tid, policy, param.sched_priority); + Y_ABORT("sched_setscheduler(%" PRIu64 ", %d, %d) -> ESRCH", tid, policy, param.sched_priority); default: - Y_FAIL("sched_setscheduler(%" PRIu64 ", %d, %d) -> %d", tid, policy, param.sched_priority, ret); + Y_ABORT("sched_setscheduler(%" PRIu64 ", %d, %d) -> %d", tid, policy, param.sched_priority, ret); } #else Y_UNUSED(tid); @@ -865,23 +865,23 @@ namespace NActors { } // Should never be called - void ReclaimMailbox(TMailboxType::EType, ui32, TWorkerId, ui64) override { Y_FAIL(); } - TMailboxHeader *ResolveMailbox(ui32) override { Y_FAIL(); } - void Schedule(TInstant, TAutoPtr<IEventHandle>, ISchedulerCookie*, TWorkerId) override { Y_FAIL(); } - void Schedule(TMonotonic, TAutoPtr<IEventHandle>, ISchedulerCookie*, TWorkerId) override { Y_FAIL(); } - void Schedule(TDuration, TAutoPtr<IEventHandle>, ISchedulerCookie*, TWorkerId) override { Y_FAIL(); } - bool Send(TAutoPtr<IEventHandle>&) override { Y_FAIL(); } - bool SpecificSend(TAutoPtr<IEventHandle>&) override { Y_FAIL(); } - void ScheduleActivation(ui32) override { Y_FAIL(); } - void SpecificScheduleActivation(ui32) override { Y_FAIL(); } - void ScheduleActivationEx(ui32, ui64) override { Y_FAIL(); } - TActorId Register(IActor*, TMailboxType::EType, ui64, const TActorId&) override { Y_FAIL(); } - TActorId Register(IActor*, TMailboxHeader*, ui32, const TActorId&) override { Y_FAIL(); } - void Prepare(TActorSystem*, NSchedulerQueue::TReader**, ui32*) override { Y_FAIL(); } - void Start() override { Y_FAIL(); } - void PrepareStop() override { Y_FAIL(); } - void Shutdown() override { Y_FAIL(); } - bool Cleanup() override { Y_FAIL(); } + void ReclaimMailbox(TMailboxType::EType, ui32, TWorkerId, ui64) override { Y_ABORT(); } + TMailboxHeader *ResolveMailbox(ui32) override { Y_ABORT(); } + void Schedule(TInstant, TAutoPtr<IEventHandle>, ISchedulerCookie*, TWorkerId) override { Y_ABORT(); } + void Schedule(TMonotonic, TAutoPtr<IEventHandle>, ISchedulerCookie*, TWorkerId) override { Y_ABORT(); } + void Schedule(TDuration, TAutoPtr<IEventHandle>, ISchedulerCookie*, TWorkerId) override { Y_ABORT(); } + bool Send(TAutoPtr<IEventHandle>&) override { Y_ABORT(); } + bool SpecificSend(TAutoPtr<IEventHandle>&) override { Y_ABORT(); } + void ScheduleActivation(ui32) override { Y_ABORT(); } + void SpecificScheduleActivation(ui32) override { Y_ABORT(); } + void ScheduleActivationEx(ui32, ui64) override { Y_ABORT(); } + TActorId Register(IActor*, TMailboxType::EType, ui64, const TActorId&) override { Y_ABORT(); } + TActorId Register(IActor*, TMailboxHeader*, ui32, const TActorId&) override { Y_ABORT(); } + void Prepare(TActorSystem*, NSchedulerQueue::TReader**, ui32*) override { Y_ABORT(); } + void Start() override { Y_ABORT(); } + void PrepareStop() override { Y_ABORT(); } + void Shutdown() override { Y_ABORT(); } + bool Cleanup() override { Y_ABORT(); } }; // Proxy executor pool working with cpu-local scheduler (aka actorsystem 2.0) @@ -1058,7 +1058,7 @@ namespace NActors { return token; } case TCpuState::Forbidden: - Y_FAIL(); + Y_ABORT(); case TCpuState::Stopped: return CpuStopped; } @@ -1401,7 +1401,7 @@ namespace NActors { } TAffinity* TUnitedExecutorPool::Affinity() const { - Y_FAIL(); // should never be called, TCpuExecutorPool is used instead + Y_ABORT(); // should never be called, TCpuExecutorPool is used instead } ui32 TUnitedExecutorPool::GetThreads() const { @@ -1409,7 +1409,7 @@ namespace NActors { } ui32 TUnitedExecutorPool::GetReadyActivation(TWorkerContext&, ui64) { - Y_FAIL(); // should never be called, TCpu*ExecutorPool is used instead + Y_ABORT(); // should never be called, TCpu*ExecutorPool is used instead } inline void TUnitedExecutorPool::ScheduleActivation(ui32 activation) { diff --git a/library/cpp/actors/core/executor_thread.cpp b/library/cpp/actors/core/executor_thread.cpp index deddb0a97e..eed1794ab1 100644 --- a/library/cpp/actors/core/executor_thread.cpp +++ b/library/cpp/actors/core/executor_thread.cpp @@ -539,7 +539,7 @@ namespace NActors { case TExecutionState::FreeLeavingMarked: return false; default: - Y_FAIL(); + Y_ABORT(); } } } @@ -572,7 +572,7 @@ namespace NActors { case TExecutionState::FreeLeavingMarked: return false; default: - Y_FAIL(); + Y_ABORT(); } } } @@ -587,7 +587,7 @@ namespace NActors { case TExecutionState::Leaving: case TExecutionState::Executing: case TExecutionState::LeavingMarked: - Y_FAIL(); + Y_ABORT(); case TExecutionState::Free: if (AtomicUi32Cas(&ExecutionState, TExecutionState::Executing, TExecutionState::Free)) return true; @@ -601,7 +601,7 @@ namespace NActors { case TExecutionState::FreeLeavingMarked: return false; default: - Y_FAIL(); + Y_ABORT(); } } } @@ -613,7 +613,7 @@ namespace NActors { else if (state == TExecutionState::FreeExecuting) AtomicStore(&ExecutionState, (ui32)TExecutionState::FreeLeaving); else - Y_FAIL(); + Y_ABORT(); AtomicBarrier(); } @@ -624,7 +624,7 @@ namespace NActors { switch (state) { case TExecutionState::Inactive: case TExecutionState::Scheduled: - Y_FAIL(); + Y_ABORT(); case TExecutionState::Leaving: if (!wouldReschedule) { if (AtomicUi32Cas(&ExecutionState, TExecutionState::Inactive, TExecutionState::Leaving)) @@ -635,14 +635,14 @@ namespace NActors { } break; case TExecutionState::Executing: - Y_FAIL(); + Y_ABORT(); case TExecutionState::LeavingMarked: if (AtomicUi32Cas(&ExecutionState, TExecutionState::Scheduled, TExecutionState::LeavingMarked)) return true; break; case TExecutionState::Free: case TExecutionState::FreeScheduled: - Y_FAIL(); + Y_ABORT(); case TExecutionState::FreeLeaving: if (!wouldReschedule) { if (AtomicUi32Cas(&ExecutionState, TExecutionState::Free, TExecutionState::FreeLeaving)) @@ -653,13 +653,13 @@ namespace NActors { } break; case TExecutionState::FreeExecuting: - Y_FAIL(); + Y_ABORT(); case TExecutionState::FreeLeavingMarked: if (AtomicUi32Cas(&ExecutionState, TExecutionState::FreeScheduled, TExecutionState::FreeLeavingMarked)) return true; break; default: - Y_FAIL(); + Y_ABORT(); } } } @@ -671,7 +671,7 @@ namespace NActors { switch (state) { case TExecutionState::Inactive: case TExecutionState::Scheduled: - Y_FAIL(); + Y_ABORT(); case TExecutionState::Leaving: if (!wouldReschedule) { if (AtomicUi32Cas(&ExecutionState, TExecutionState::Free, TExecutionState::Leaving)) @@ -682,7 +682,7 @@ namespace NActors { } break; case TExecutionState::Executing: - Y_FAIL(); + Y_ABORT(); case TExecutionState::LeavingMarked: if (AtomicUi32Cas(&ExecutionState, TExecutionState::FreeScheduled, TExecutionState::LeavingMarked)) return true; @@ -692,9 +692,9 @@ namespace NActors { case TExecutionState::FreeLeaving: case TExecutionState::FreeExecuting: case TExecutionState::FreeLeavingMarked: - Y_FAIL(); + Y_ABORT(); default: - Y_FAIL(); + Y_ABORT(); } } } diff --git a/library/cpp/actors/core/interconnect.cpp b/library/cpp/actors/core/interconnect.cpp index 8671fb2db7..b477f71e57 100644 --- a/library/cpp/actors/core/interconnect.cpp +++ b/library/cpp/actors/core/interconnect.cpp @@ -171,7 +171,7 @@ namespace NActors { } default: - Y_FAIL("unexpected legacy key# %d", key); + Y_ABORT("unexpected legacy key# %d", key); } } diff --git a/library/cpp/actors/core/invoke.h b/library/cpp/actors/core/invoke.h index 6151c32bfa..c9e29effe2 100644 --- a/library/cpp/actors/core/invoke.h +++ b/library/cpp/actors/core/invoke.h @@ -54,7 +54,7 @@ namespace NActors { } else if (auto *value = std::any_cast<T>(&arg)) { return std::move(*value); } else { - Y_FAIL("unspported return type for TEvInvokeResult: actual# %s != expected# %s", + Y_ABORT("unspported return type for TEvInvokeResult: actual# %s != expected# %s", TypeName(arg.type()).data(), TypeName<T>().data()); } }, Result); diff --git a/library/cpp/actors/core/log.h b/library/cpp/actors/core/log.h index 3e171b9b73..44cd3730a4 100644 --- a/library/cpp/actors/core/log.h +++ b/library/cpp/actors/core/log.h @@ -524,7 +524,7 @@ namespace NActors { ~TVerifyFormattedRecordWriter() { const TString data = TBase::GetResult(); - Y_FAIL("%s", data.data()); + Y_ABORT("%s", data.data()); } }; } diff --git a/library/cpp/actors/core/mailbox.cpp b/library/cpp/actors/core/mailbox.cpp index 37cb900ecf..d11ff9cbcb 100644 --- a/library/cpp/actors/core/mailbox.cpp +++ b/library/cpp/actors/core/mailbox.cpp @@ -36,7 +36,7 @@ namespace NActors { case TMailboxHeader::TExecutionState::FreeLeavingMarked: return false; default: - Y_FAIL(); + Y_ABORT(); } } @@ -84,7 +84,7 @@ namespace NActors { DestructMailboxLine<TTinyReadAsFilledMailbox>((ui8*)lineHeader + 64, (ui8*)lineHeader + LineSize); break; default: - Y_FAIL(); + Y_ABORT(); } lineHeader->~TMailboxLineHeader(); @@ -126,7 +126,7 @@ namespace NActors { done &= CleanupMailboxLine<TTinyReadAsFilledMailbox>((ui8*)lineHeader + 64, (ui8*)lineHeader + LineSize); break; default: - Y_FAIL(); + Y_ABORT(); } } } @@ -262,7 +262,7 @@ namespace NActors { } return true; default: - Y_FAIL("unknown mailbox type"); + Y_ABORT("unknown mailbox type"); } } @@ -319,7 +319,7 @@ namespace NActors { } while (AtomicGet(CachedTinyReadAsFilledMailboxes) > (MailboxCacheTinyReadAsFilled.Concurrency * 512)); return 0; default: - Y_FAIL("Unknown mailbox type"); + Y_ABORT("Unknown mailbox type"); } } @@ -353,7 +353,7 @@ namespace NActors { AtomicIncrement(CachedTinyReadAsFilledMailboxes); break; default: - Y_FAIL(); + Y_ABORT(); } } } @@ -557,7 +557,7 @@ namespace NActors { counter = &CachedTinyReadAsFilledMailboxes; break; default: - Y_FAIL(); + Y_ABORT(); } AtomicStore(Lines + lineIndex, header); diff --git a/library/cpp/actors/core/mailbox.h b/library/cpp/actors/core/mailbox.h index d7e3ef5384..4697dedcfd 100644 --- a/library/cpp/actors/core/mailbox.h +++ b/library/cpp/actors/core/mailbox.h @@ -168,7 +168,7 @@ namespace NActors { break; } default: - Y_FAIL(); + Y_ABORT(); } return nullptr; } @@ -211,7 +211,7 @@ namespace NActors { break; } default: - Y_FAIL(); + Y_ABORT(); } } diff --git a/library/cpp/actors/core/scheduler_cookie.cpp b/library/cpp/actors/core/scheduler_cookie.cpp index 0fa6f543a7..b975a80c07 100644 --- a/library/cpp/actors/core/scheduler_cookie.cpp +++ b/library/cpp/actors/core/scheduler_cookie.cpp @@ -24,11 +24,11 @@ namespace NActors { return false; } - Y_FAIL(); + Y_ABORT(); } bool DetachEvent() noexcept override { - Y_FAIL(); + Y_ABORT(); } }; @@ -60,7 +60,7 @@ namespace NActors { return false; } - Y_FAIL(); + Y_ABORT(); } bool DetachEvent() noexcept override { @@ -74,7 +74,7 @@ namespace NActors { return false; } - Y_FAIL(); + Y_ABORT(); } }; |