Browse Source

Restoring authorship annotation for Alexey Efimov <xeno@prnwatch.com>. Commit 1 of 2.

Alexey Efimov 3 years ago
parent
commit
26e0e4fb5e

+ 2 - 2
build/rules/kikimr.policy

@@ -89,7 +89,7 @@ ALLOW cloud/kms/benchcrypto/cpp -> kikimr/core/blobstorage/crypto
 ALLOW rtmapreduce -> kikimr/yf
 
 ALLOW rtmapreduce/libs -> kikimr/core
-ALLOW rtmapreduce/libs -> kikimr/yndx
+ALLOW rtmapreduce/libs -> kikimr/yndx 
 ALLOW rtmapreduce/libs -> kikimr/library/shop
 ALLOW rtmapreduce/libs -> kikimr/driver_lib/run
 ALLOW rtmapreduce/libs -> kikimr/library/aclib
@@ -159,7 +159,7 @@ ALLOW ydb/library/yql/dq/actors/compute -> kikimr/core/protos
 ALLOW yql/ -> kikimr/library/mkql_proto
 ALLOW yql/ -> kikimr/library/binary_json
 ALLOW yql/ -> kikimr/library/dynumber
-ALLOW yql/ -> kikimr/yndx/security
+ALLOW yql/ -> kikimr/yndx/security 
 
 ALLOW ydb/library/yql/providers/ydb -> kikimr/yq
 ALLOW ydb/library/yql/providers/ydb -> kikimr/public/lib/experimental

+ 1 - 1
library/cpp/actors/core/actor.h

@@ -239,7 +239,7 @@ namespace NActors {
             INTERCONNECT_POLLER = 285,
             INTERCONNECT_SESSION_KILLER = 286,
             ACTOR_SYSTEM_SCHEDULER_ACTOR = 312,
-            ACTOR_FUTURE_CALLBACK = 337,
+            ACTOR_FUTURE_CALLBACK = 337, 
             INTERCONNECT_MONACTOR = 362,
             INTERCONNECT_LOAD_ACTOR = 376,
             INTERCONNECT_LOAD_RESPONDER = 377,

+ 4 - 4
library/cpp/actors/core/actorsystem.h

@@ -120,10 +120,10 @@ namespace NActors {
             return TString();
         }
 
-        virtual ui32 GetThreads() const {
-            return 1;
-        }
-
+        virtual ui32 GetThreads() const { 
+            return 1; 
+        } 
+ 
         // generic
         virtual TAffinity* Affinity() const = 0;
 

+ 1 - 1
library/cpp/actors/core/event_local.h

@@ -66,7 +66,7 @@ namespace NActors {
         static IEventBase* Load(NActors::TEventSerializedData*) {
             return new TEv();
         }
-
+ 
         static IEventBase* Load(const TString&) {
             return new TEv();
         }

+ 52 - 52
library/cpp/actors/core/event_pb.h

@@ -157,7 +157,7 @@ namespace NActors {
         TString ToString() const override {
             return Record.ShortDebugString();
         }
-
+ 
         bool IsSerializable() const override {
             return true;
         }
@@ -422,72 +422,72 @@ namespace NActors {
             return TypeName<TEv>() + " { " + TBase::Record.ShortDebugString() + " }";
         }
     };
-
-    template <typename TEv, typename TRecord, ui32 TEventType>
+ 
+    template <typename TEv, typename TRecord, ui32 TEventType> 
     class TEventPreSerializedPB: public TEventPB<TEv, TRecord, TEventType> {
-    protected:
-        using TBase = TEventPB<TEv, TRecord, TEventType>;
-        using TSelf = TEventPreSerializedPB<TEv, TRecord, TEventType>;
-        using TBase::Record;
-
-    public:
-        TString PreSerializedData; // already serialized PB data (using message::SerializeToString)
-
-        TEventPreSerializedPB() = default;
-
-        explicit TEventPreSerializedPB(const TRecord& rec)
-            : TBase(rec)
+    protected: 
+        using TBase = TEventPB<TEv, TRecord, TEventType>; 
+        using TSelf = TEventPreSerializedPB<TEv, TRecord, TEventType>; 
+        using TBase::Record; 
+ 
+    public: 
+        TString PreSerializedData; // already serialized PB data (using message::SerializeToString) 
+ 
+        TEventPreSerializedPB() = default; 
+ 
+        explicit TEventPreSerializedPB(const TRecord& rec) 
+            : TBase(rec) 
         {
         }
-
-        explicit TEventPreSerializedPB(TRecord&& rec)
-            : TBase(std::move(rec))
+ 
+        explicit TEventPreSerializedPB(TRecord&& rec) 
+            : TBase(std::move(rec)) 
         {
         }
-
-        // when remote event received locally this method will merge preserialized data
-        const TRecord& GetRecord() {
-            TRecord& base(TBase::Record);
-            if (!PreSerializedData.empty()) {
-                TRecord copy;
+ 
+        // when remote event received locally this method will merge preserialized data 
+        const TRecord& GetRecord() { 
+            TRecord& base(TBase::Record); 
+            if (!PreSerializedData.empty()) { 
+                TRecord copy; 
                 Y_PROTOBUF_SUPPRESS_NODISCARD copy.ParseFromString(PreSerializedData);
-                copy.MergeFrom(base);
-                base.Swap(&copy);
-                PreSerializedData.clear();
-            }
+                copy.MergeFrom(base); 
+                base.Swap(&copy); 
+                PreSerializedData.clear(); 
+            } 
             return TBase::Record;
-        }
-
-        const TRecord& GetRecord() const {
-            return const_cast<TSelf*>(this)->GetRecord();
-        }
-
-        TRecord* MutableRecord() {
+        } 
+ 
+        const TRecord& GetRecord() const { 
+            return const_cast<TSelf*>(this)->GetRecord(); 
+        } 
+ 
+        TRecord* MutableRecord() { 
             GetRecord(); // Make sure PreSerializedData is parsed
-            return &(TBase::Record);
-        }
-
-        TString ToString() const override {
+            return &(TBase::Record); 
+        } 
+ 
+        TString ToString() const override { 
             return GetRecord().ShortDebugString();
-        }
-
+        } 
+ 
         bool SerializeToArcadiaStream(TChunkSerializer* chunker) const override {
             return chunker->WriteString(&PreSerializedData) && TBase::SerializeToArcadiaStream(chunker);
-        }
-
-        ui32 CalculateSerializedSize() const override {
-            return PreSerializedData.size() + TBase::CalculateSerializedSize();
-        }
-
-        size_t GetCachedByteSize() const {
-            return PreSerializedData.size() + TBase::GetCachedByteSize();
-        }
+        } 
+ 
+        ui32 CalculateSerializedSize() const override { 
+            return PreSerializedData.size() + TBase::CalculateSerializedSize(); 
+        } 
+ 
+        size_t GetCachedByteSize() const { 
+            return PreSerializedData.size() + TBase::GetCachedByteSize(); 
+        } 
 
         ui32 CalculateSerializedSizeCached() const override {
             return GetCachedByteSize();
         }
-    };
-
+    }; 
+ 
     inline TActorId ActorIdFromProto(const NActorsProto::TActorId& actorId) {
         return TActorId(actorId.GetRawX1(), actorId.GetRawX2());
     }

+ 4 - 4
library/cpp/actors/core/executor_pool_base.cpp

@@ -161,8 +161,8 @@ namespace NActors {
     bool TExecutorPoolBaseMailboxed::Cleanup() {
         return MailboxTable->Cleanup();
     }
-
-    ui32 TExecutorPoolBase::GetThreads() const {
-        return PoolThreads;
-    }
+ 
+    ui32 TExecutorPoolBase::GetThreads() const { 
+        return PoolThreads; 
+    } 
 }

+ 1 - 1
library/cpp/actors/core/executor_pool_base.h

@@ -42,7 +42,7 @@ namespace NActors {
         ~TExecutorPoolBase();
         void ScheduleActivation(ui32 activation) override;
         TAffinity* Affinity() const override;
-        ui32 GetThreads() const override;
+        ui32 GetThreads() const override; 
     };
 
     void DoActorInit(TActorSystem*, IActor*, const TActorId&, const TActorId&);

+ 12 - 12
library/cpp/actors/core/interconnect.h

@@ -60,7 +60,7 @@ namespace NActors {
 
         // protobuf-parser ctor
         explicit TNodeLocation(const NActorsInterconnect::TNodeLocation& location);
-
+ 
         // serialized protobuf ctor
         static constexpr struct TFromSerialized {} FromSerialized {};
         TNodeLocation(TFromSerialized, const TString& s);
@@ -114,7 +114,7 @@ namespace NActors {
         friend bool operator > (const TNodeLocation& x, const TNodeLocation& y) { return x.Compare(y) >  0; }
         friend bool operator >=(const TNodeLocation& x, const TNodeLocation& y) { return x.Compare(y) >= 0; }
     };
-
+ 
     struct TEvInterconnect {
         enum EEv {
             EvForward = EventSpaceBegin(TEvents::ES_INTERCONNECT),
@@ -177,7 +177,7 @@ namespace NActors {
 
         struct TEvListNodes: public TEventLocal<TEvListNodes, EvListNodes> {
         };
-
+ 
         struct TNodeInfo {
             ui32 NodeId;
             TString Address;
@@ -185,10 +185,10 @@ namespace NActors {
             TString ResolveHost;
             ui16 Port;
             TNodeLocation Location;
-
-            TNodeInfo() = default;
-            TNodeInfo(const TNodeInfo&) = default;
-            TNodeInfo& operator =(const TNodeInfo&) = default;
+ 
+            TNodeInfo() = default; 
+            TNodeInfo(const TNodeInfo&) = default; 
+            TNodeInfo& operator =(const TNodeInfo&) = default; 
             TNodeInfo(ui32 nodeId,
                       const TString& address,
                       const TString& host,
@@ -203,12 +203,12 @@ namespace NActors {
                 , Location(location)
             {
             }
-
+ 
             operator ui32() const {
                 return NodeId;
             }
         };
-
+ 
         struct TEvNodesInfo: public TEventLocal<TEvNodesInfo, EvNodesInfo> {
             TVector<TNodeInfo> Nodes;
 
@@ -218,8 +218,8 @@ namespace NActors {
                         return &x;
                 }
                 return nullptr;
-            }
-        };
+            } 
+        }; 
 
         struct TEvDisconnect;
 
@@ -251,5 +251,5 @@ namespace NActors {
         struct TEvPoisonSession : TEventLocal<TEvPoisonSession, EvPoisonSession> {};
 
         struct TEvTerminate : TEventLocal<TEvTerminate, EvTerminate> {};
-    };
+    }; 
 }

+ 5 - 5
library/cpp/actors/core/log.cpp

@@ -11,7 +11,7 @@ static_assert(int(NActors::NLog::PRI_WARN) == int(::TLOG_WARNING), "expect int(N
 static_assert(int(NActors::NLog::PRI_NOTICE) == int(::TLOG_NOTICE), "expect int(NActors::NLog::PRI_NOTICE) == int(::TLOG_NOTICE)");
 static_assert(int(NActors::NLog::PRI_INFO) == int(::TLOG_INFO), "expect int(NActors::NLog::PRI_INFO) == int(::TLOG_INFO)");
 static_assert(int(NActors::NLog::PRI_DEBUG) == int(::TLOG_DEBUG), "expect int(NActors::NLog::PRI_DEBUG) == int(::TLOG_DEBUG)");
-static_assert(int(NActors::NLog::PRI_TRACE) == int(::TLOG_RESOURCES), "expect int(NActors::NLog::PRI_TRACE) == int(::TLOG_RESOURCES)");
+static_assert(int(NActors::NLog::PRI_TRACE) == int(::TLOG_RESOURCES), "expect int(NActors::NLog::PRI_TRACE) == int(::TLOG_RESOURCES)"); 
 
 namespace {
     struct TRecordWithNewline {
@@ -441,7 +441,7 @@ namespace NActors {
                             str << "Change priority" << Endl;
                         }
                         UL() {
-                            for (int p = NLog::PRI_EMERG; p <= NLog::PRI_TRACE; ++p) {
+                            for (int p = NLog::PRI_EMERG; p <= NLog::PRI_TRACE; ++p) { 
                                 LI() {
                                     str << "<a href='logger?c=" << component << "&p=" << p << "'>"
                                         << NLog::PriorityToString(NLog::EPrio(p)) << "</a>";
@@ -452,7 +452,7 @@ namespace NActors {
                             str << "Change sampling priority" << Endl;
                         }
                         UL() {
-                            for (int p = NLog::PRI_EMERG; p <= NLog::PRI_TRACE; ++p) {
+                            for (int p = NLog::PRI_EMERG; p <= NLog::PRI_TRACE; ++p) { 
                                 LI() {
                                     str << "<a href='logger?c=" << component << "&sp=" << p << "'>"
                                         << NLog::PriorityToString(NLog::EPrio(p)) << "</a>";
@@ -515,7 +515,7 @@ namespace NActors {
                                 }
                             }
                             TABLEBODY() {
-                                for (int p = NLog::PRI_EMERG; p <= NLog::PRI_TRACE; ++p) {
+                                for (int p = NLog::PRI_EMERG; p <= NLog::PRI_TRACE; ++p) { 
                                     TABLER() {
                                         TABLED() {
                                             str << "<a href = 'logger?c=-1&p=" << p << "'>"
@@ -537,7 +537,7 @@ namespace NActors {
                                 }
                             }
                             TABLEBODY() {
-                                for (int p = NLog::PRI_EMERG; p <= NLog::PRI_TRACE; ++p) {
+                                for (int p = NLog::PRI_EMERG; p <= NLog::PRI_TRACE; ++p) { 
                                     TABLER() {
                                         TABLED() {
                                             str << "<a href = 'logger?c=-1&sp=" << p << "'>"

+ 20 - 20
library/cpp/actors/core/mon.h

@@ -12,7 +12,7 @@ namespace NActors {
             HttpInfoRes,
             RemoteHttpInfo,
             RemoteHttpInfoRes,
-            RemoteJsonInfoRes,
+            RemoteJsonInfoRes, 
             RemoteBinaryInfoRes,
             End
         };
@@ -28,14 +28,14 @@ namespace NActors {
             }
 
             TEvHttpInfo(const NMonitoring::IMonHttpRequest& request, const TString& userToken)
-                : Request(request)
-                , UserToken(userToken)
-                , SubRequestId(0)
-            {
-            }
-
+                : Request(request) 
+                , UserToken(userToken) 
+                , SubRequestId(0) 
+            { 
+            } 
+ 
             const NMonitoring::IMonHttpRequest& Request;
-            TString UserToken; // built and serialized
+            TString UserToken; // built and serialized 
             // SubRequestId != 0 means that we assemble reply from multiple parts and SubRequestId contains this part id
             int SubRequestId;
         };
@@ -168,22 +168,22 @@ namespace NActors {
         struct TEvRemoteJsonInfoRes: public NActors::TEventBase<TEvRemoteJsonInfoRes, RemoteJsonInfoRes> {
             TEvRemoteJsonInfoRes() {
             }
-
+ 
             TEvRemoteJsonInfoRes(const TString& json)
-                : Json(json)
+                : Json(json) 
             {
             }
-
+ 
             TString Json;
-
+ 
             TString ToStringHeader() const override {
-                return "TEvRemoteJsonInfoRes";
-            }
-
+                return "TEvRemoteJsonInfoRes"; 
+            } 
+ 
             bool SerializeToArcadiaStream(TChunkSerializer *serializer) const override {
                 return serializer->WriteString(&Json);
-            }
-
+            } 
+ 
             ui32 CalculateSerializedSize() const override {
                 return Json.size();
             }
@@ -194,9 +194,9 @@ namespace NActors {
 
             static IEventBase* Load(TEventSerializedData* bufs) {
                 return new TEvRemoteJsonInfoRes(bufs->GetString());
-            }
-        };
-
+            } 
+        }; 
+ 
         struct TEvRemoteBinaryInfoRes: public NActors::TEventBase<TEvRemoteBinaryInfoRes, RemoteBinaryInfoRes> {
             TEvRemoteBinaryInfoRes() {
             }

Some files were not shown because too many files changed in this diff