aboutsummaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
authoralexnick <alexnick@yandex-team.ru>2022-02-10 16:47:45 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:47:45 +0300
commit80ba7327fdd90a6281bcec18f03e84ff856c3559 (patch)
tree0151ace31c13e6d6ec74aac742084670ca5493a3 /library
parent6aced6c854653b75aab9808d5995be5fc4d9fa53 (diff)
downloadydb-80ba7327fdd90a6281bcec18f03e84ff856c3559.tar.gz
Restoring authorship annotation for <alexnick@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library')
-rw-r--r--library/cpp/actors/core/actor.cpp6
-rw-r--r--library/cpp/actors/core/actor.h2
-rw-r--r--library/cpp/actors/http/http.cpp112
-rw-r--r--library/cpp/actors/testlib/test_runtime.cpp12
-rw-r--r--library/cpp/actors/testlib/test_runtime.h2
-rw-r--r--library/cpp/containers/disjoint_interval_tree/disjoint_interval_tree.h18
-rw-r--r--library/cpp/containers/disjoint_interval_tree/ut/disjoint_interval_tree_ut.cpp32
7 files changed, 92 insertions, 92 deletions
diff --git a/library/cpp/actors/core/actor.cpp b/library/cpp/actors/core/actor.cpp
index 6f9ba6a42b..3d67d080d8 100644
--- a/library/cpp/actors/core/actor.cpp
+++ b/library/cpp/actors/core/actor.cpp
@@ -41,10 +41,10 @@ namespace NActors {
TlsActivationContext->ExecutorThread.Schedule(deadline, ev, cookie);
}
- void TActivationContext::Schedule(TDuration delta, TAutoPtr<IEventHandle> ev, ISchedulerCookie* cookie) {
+ void TActivationContext::Schedule(TDuration delta, TAutoPtr<IEventHandle> ev, ISchedulerCookie* cookie) {
TlsActivationContext->ExecutorThread.Schedule(delta, ev, cookie);
- }
-
+ }
+
bool TActorIdentity::Send(const TActorId& recipient, IEventBase* ev, ui32 flags, ui64 cookie, NWilson::TTraceId traceId) const {
return TActivationContext::Send(new IEventHandle(recipient, *this, ev, flags, cookie, nullptr, std::move(traceId)));
}
diff --git a/library/cpp/actors/core/actor.h b/library/cpp/actors/core/actor.h
index ed29bd14b9..1575f22d22 100644
--- a/library/cpp/actors/core/actor.h
+++ b/library/cpp/actors/core/actor.h
@@ -62,7 +62,7 @@ namespace NActors {
* @param ev the event to send
* @param cookie cookie that will be piggybacked with event
*/
- static void Schedule(TDuration delta, TAutoPtr<IEventHandle> ev, ISchedulerCookie* cookie = nullptr);
+ static void Schedule(TDuration delta, TAutoPtr<IEventHandle> ev, ISchedulerCookie* cookie = nullptr);
static TInstant Now();
static TMonotonic Monotonic();
diff --git a/library/cpp/actors/http/http.cpp b/library/cpp/actors/http/http.cpp
index 7125f9d8b0..c2ebcec98f 100644
--- a/library/cpp/actors/http/http.cpp
+++ b/library/cpp/actors/http/http.cpp
@@ -111,65 +111,65 @@ void THttpParser<THttpRequest, TSocketBuffer>::Advance(size_t len) {
break;
}
case EParseStage::Body: {
- if (!ContentLength.empty()) {
- if (ProcessData(Content, data, FromString(ContentLength))) {
- Body = Content;
- Stage = EParseStage::Done;
- }
- } else if (TransferEncoding == "chunked") {
- Stage = EParseStage::ChunkLength;
- } else {
- // Invalid body encoding
- Stage = EParseStage::Error;
- }
- break;
- }
- case EParseStage::ChunkLength: {
- if (ProcessData(Line, data, "\r\n", MaxChunkLengthSize)) {
- if (!Line.empty()) {
- ChunkLength = ParseHex(Line);
- if (ChunkLength <= MaxChunkSize) {
- ContentSize = Content.size() + ChunkLength;
- if (ContentSize <= MaxChunkContentSize) {
- Stage = EParseStage::ChunkData;
- Line.Clear();
- } else {
- // Invalid chunk content length
- Stage = EParseStage::Error;
- }
- } else {
- // Invalid chunk length
- Stage = EParseStage::Error;
- }
- } else {
- // Invalid body encoding
- Stage = EParseStage::Error;
- }
+ if (!ContentLength.empty()) {
+ if (ProcessData(Content, data, FromString(ContentLength))) {
+ Body = Content;
+ Stage = EParseStage::Done;
+ }
+ } else if (TransferEncoding == "chunked") {
+ Stage = EParseStage::ChunkLength;
+ } else {
+ // Invalid body encoding
+ Stage = EParseStage::Error;
}
break;
}
- case EParseStage::ChunkData: {
- if (!IsError()) {
- if (ProcessData(Content, data, ContentSize)) {
- if (ProcessData(Line, data, 2)) {
- if (Line == "\r\n") {
- if (ChunkLength == 0) {
- Body = Content;
- Stage = EParseStage::Done;
- } else {
- Stage = EParseStage::ChunkLength;
- }
- Line.Clear();
- } else {
- // Invalid body encoding
- Stage = EParseStage::Error;
- }
- }
- }
- }
- break;
- }
-
+ case EParseStage::ChunkLength: {
+ if (ProcessData(Line, data, "\r\n", MaxChunkLengthSize)) {
+ if (!Line.empty()) {
+ ChunkLength = ParseHex(Line);
+ if (ChunkLength <= MaxChunkSize) {
+ ContentSize = Content.size() + ChunkLength;
+ if (ContentSize <= MaxChunkContentSize) {
+ Stage = EParseStage::ChunkData;
+ Line.Clear();
+ } else {
+ // Invalid chunk content length
+ Stage = EParseStage::Error;
+ }
+ } else {
+ // Invalid chunk length
+ Stage = EParseStage::Error;
+ }
+ } else {
+ // Invalid body encoding
+ Stage = EParseStage::Error;
+ }
+ }
+ break;
+ }
+ case EParseStage::ChunkData: {
+ if (!IsError()) {
+ if (ProcessData(Content, data, ContentSize)) {
+ if (ProcessData(Line, data, 2)) {
+ if (Line == "\r\n") {
+ if (ChunkLength == 0) {
+ Body = Content;
+ Stage = EParseStage::Done;
+ } else {
+ Stage = EParseStage::ChunkLength;
+ }
+ Line.Clear();
+ } else {
+ // Invalid body encoding
+ Stage = EParseStage::Error;
+ }
+ }
+ }
+ }
+ break;
+ }
+
case EParseStage::Done:
case EParseStage::Error: {
data.Clear();
diff --git a/library/cpp/actors/testlib/test_runtime.cpp b/library/cpp/actors/testlib/test_runtime.cpp
index 6fa25b9965..4bb7c79009 100644
--- a/library/cpp/actors/testlib/test_runtime.cpp
+++ b/library/cpp/actors/testlib/test_runtime.cpp
@@ -1708,13 +1708,13 @@ namespace NActors {
Y_FAIL("Don't use this method.");
}
- TActorSystem* TTestActorRuntimeBase::GetActorSystem(ui32 nodeId) {
- auto it = Nodes.find(GetNodeId(nodeId));
- Y_VERIFY(it != Nodes.end());
- return it->second->ActorSystem.Get();
- }
-
+ TActorSystem* TTestActorRuntimeBase::GetActorSystem(ui32 nodeId) {
+ auto it = Nodes.find(GetNodeId(nodeId));
+ Y_VERIFY(it != Nodes.end());
+ return it->second->ActorSystem.Get();
+ }
+
TEventMailBox& TTestActorRuntimeBase::GetMailbox(ui32 nodeId, ui32 hint) {
TGuard<TMutex> guard(Mutex);
auto mboxId = TEventMailboxId(nodeId, hint);
diff --git a/library/cpp/actors/testlib/test_runtime.h b/library/cpp/actors/testlib/test_runtime.h
index 26e3b45c98..8fe2ce88c9 100644
--- a/library/cpp/actors/testlib/test_runtime.h
+++ b/library/cpp/actors/testlib/test_runtime.h
@@ -286,7 +286,7 @@ namespace NActors {
TActorSystem* SingleSys() const;
TActorSystem* GetAnyNodeActorSystem();
- TActorSystem* GetActorSystem(ui32 nodeId);
+ TActorSystem* GetActorSystem(ui32 nodeId);
template <typename TEvent>
TEvent* GrabEdgeEventIf(TAutoPtr<IEventHandle>& handle, std::function<bool(const TEvent&)> predicate, TDuration simTimeout = TDuration::Max()) {
handle.Destroy();
diff --git a/library/cpp/containers/disjoint_interval_tree/disjoint_interval_tree.h b/library/cpp/containers/disjoint_interval_tree/disjoint_interval_tree.h
index 1f899c9991..53108ad90f 100644
--- a/library/cpp/containers/disjoint_interval_tree/disjoint_interval_tree.h
+++ b/library/cpp/containers/disjoint_interval_tree/disjoint_interval_tree.h
@@ -222,15 +222,15 @@ private:
// try to extend interval
if (p != Tree.end() && p->second == begin) {
p->second = end;
- //Try to merge 2 intervals - p and next one if possible
- auto next = p;
- // Next is not Tree.end() here.
- ++next;
- if (next != Tree.end() && next->first == end) {
- p->second = next->second;
- Tree.erase(next);
- }
- // Maybe new interval extends right interval
+ //Try to merge 2 intervals - p and next one if possible
+ auto next = p;
+ // Next is not Tree.end() here.
+ ++next;
+ if (next != Tree.end() && next->first == end) {
+ p->second = next->second;
+ Tree.erase(next);
+ }
+ // Maybe new interval extends right interval
} else if (l != Tree.end() && end == l->first) {
T& leftBorder = const_cast<T&>(l->first);
// Optimization hack.
diff --git a/library/cpp/containers/disjoint_interval_tree/ut/disjoint_interval_tree_ut.cpp b/library/cpp/containers/disjoint_interval_tree/ut/disjoint_interval_tree_ut.cpp
index 8474ae89b0..a9a9fd1a07 100644
--- a/library/cpp/containers/disjoint_interval_tree/ut/disjoint_interval_tree_ut.cpp
+++ b/library/cpp/containers/disjoint_interval_tree/ut/disjoint_interval_tree_ut.cpp
@@ -55,22 +55,22 @@ Y_UNIT_TEST_SUITE(DisjointIntervalTreeTest) {
UNIT_ASSERT_VALUES_EQUAL(begin->first, 2);
UNIT_ASSERT_VALUES_EQUAL(begin->second, 7);
}
-
- // Merge all intervals.
- {
- TDisjointIntervalTree<ui64> tree;
- tree.InsertInterval(0, 3);
- tree.InsertInterval(6, 10);
- tree.InsertInterval(3, 6);
-
- UNIT_ASSERT_VALUES_EQUAL(tree.GetNumIntervals(), 1);
- UNIT_ASSERT_VALUES_EQUAL(tree.GetNumElements(), 10);
-
- auto begin = tree.begin();
- UNIT_ASSERT_VALUES_EQUAL(begin->first, 0);
- UNIT_ASSERT_VALUES_EQUAL(begin->second, 10);
- }
-
+
+ // Merge all intervals.
+ {
+ TDisjointIntervalTree<ui64> tree;
+ tree.InsertInterval(0, 3);
+ tree.InsertInterval(6, 10);
+ tree.InsertInterval(3, 6);
+
+ UNIT_ASSERT_VALUES_EQUAL(tree.GetNumIntervals(), 1);
+ UNIT_ASSERT_VALUES_EQUAL(tree.GetNumElements(), 10);
+
+ auto begin = tree.begin();
+ UNIT_ASSERT_VALUES_EQUAL(begin->first, 0);
+ UNIT_ASSERT_VALUES_EQUAL(begin->second, 10);
+ }
+
}
Y_UNIT_TEST(EraseIntervalTest) {