From 51d7eb3d2d0d505ff36d34a14cc5e464b74098e5 Mon Sep 17 00:00:00 2001 From: "yuehua.jia" <3423893+jiayuehua@users.noreply.github.com> Date: Tue, 8 Feb 2022 19:01:42 +0800 Subject: [PATCH] Pragma2ifndef (#3716) * add cmake git hooks options * githooks option * include what you use * make name follow convention * linker support lld, which is the fastest linker. If ci install lld when pull request , will set lld as default linker. * log rotate * delete werror * pragma once => ifndef * pragma once => ifndef * Werror bison * format code * fix issue 3601 (#3666) * fix meta upgrade for multi instance (#3734) * drop host only when it registe heartbeat (#3739) * Fix race of create tag and edge (#3735) * fix rece * polish * fix review * Add version for `show hosts` (#3702) * version * tck * pytest * pytest Co-authored-by: cpw <13495049+CPWstatic@users.noreply.github.com> * Enhancement/set expression depth by flag (#3722) * Set expression depth limit by flag. * Format. Co-authored-by: Yichen Wang <18348405+Aiee@users.noreply.github.com> * Update client version to v3.0.0 (#3741) * Update python package name to v3 * Update client version white list * Update go mod to v3 * Change the python package name used in tests * Update client version white list * Fix create fulltext index failed (#3747) * fix bug: the same tagId/edgetype under different spaces, failed to create fulltext indexes * fix bug: the same tagId/edgetype under different spaces, failed to create fulltext indexes * add comments and adjust log level for meta/processors/admin (#3662) * add comments and adjust log level for meta admin processors * change agent hb log level Co-authored-by: Doodle <13706157+critical27@users.noreply.github.com> * fix writternBy delete by optimizer (#3746) * fix bugs * add tck features * style Co-authored-by: cpw <13495049+CPWstatic@users.noreply.github.com> * fix with & optimizer rule error (#3736) * fix error * fix collapseProjectRule Co-authored-by: cpw <13495049+CPWstatic@users.noreply.github.com> * fix upgrade bug (#3772) Co-authored-by: Sophie <84560950+Sophie-Xie@users.noreply.github.com> * fix 3727 (#3737) Co-authored-by: Doodle <13706157+critical27@users.noreply.github.com> * Balance fix (#3668) * fix core balance in zone removing the only host in zone * fix balance plan that make redundant part * fix deadlock when runInternal and finish callback called in the same thread * fix transleader return TERM_OUT_OF_DATE * continue running balance task from last status * fix deadlock when removing part Co-authored-by: Sophie <84560950+Sophie-Xie@users.noreply.github.com> * Eliminte the useless row collect. (#3363) * Eliminte the useless row collect. * Remove comment. * Format. * Rebase. Co-authored-by: cpw <13495049+CPWstatic@users.noreply.github.com> Co-authored-by: Sophie <84560950+Sophie-Xie@users.noreply.github.com> * Add snapshot for prefix iterate. (#3717) * Add snapshot for prefix iterate. * Add header comment * Add happy test * Fix lint * Modify engine snap argument position * Fix other subclass * Fix code Co-authored-by: yaphet <4414314+darionyaphet@users.noreply.github.com> Co-authored-by: Sophie <84560950+Sophie-Xie@users.noreply.github.com> Co-authored-by: Doodle <13706157+critical27@users.noreply.github.com> * Read lock zone when create space. (#3693) Co-authored-by: yaphet <4414314+darionyaphet@users.noreply.github.com> Co-authored-by: Sophie <84560950+Sophie-Xie@users.noreply.github.com> * suppress undesired ASAN error (#3705) * suppress undesired error * fix unstable test case * 1. add comments and change log level for meta (#3709) 2. remove some unused meta kv files 3. remove unused tests 4. remove unused kv relative tests in metaclient Co-authored-by: Doodle <13706157+critical27@users.noreply.github.com> * fix upgrade (#3787) Co-authored-by: Doodle <13706157+critical27@users.noreply.github.com> * Create CODEOWNERS (#3770) Confirm with sophie.xie * disable data balance (#3756) Co-authored-by: Sophie <84560950+Sophie-Xie@users.noreply.github.com> * Fix iterator with snapshot(parameter position) (#3785) Co-authored-by: Harris.Chu <1726587+HarrisChu@users.noreply.github.com> Co-authored-by: Sophie <84560950+Sophie-Xie@users.noreply.github.com> * disable meta upgrade from v1 (#3798) * Add gflag validator for client_idle_timeout_secs (#3807) Co-authored-by: Sophie <84560950+Sophie-Xie@users.noreply.github.com> * disable zone commands (#3776) Co-authored-by: cpw <13495049+CPWstatic@users.noreply.github.com> * Add ci for standalone compile and ut. (#3637) * Add standalone workflow * remove tmp note * Add meta v2 thrift obj for sa * Add tck test * Fix port and dist tck * skip some test on sa * Fix merge * Fix add host Co-authored-by: Sophie <84560950+Sophie-Xie@users.noreply.github.com> * Fix the promise/future. (#3814) Co-authored-by: jimingquan * add comments & accumulate bug fix for TOSS (#3643) * 1. add comments & adjust some log level 2. accumulate bug fix for TOSS 2.1 one space may be affected by another space. when recover prime edges. 2.2 when call kvstore->get(), if leaderLeaseInvalid, it will report leader_change, change it to leader_lease_failed. 2.3 print all execution trace in ChainProcessor::finish(), make much more grep friendly. 2.4 some function of memory lock is hard to understand (forceLock, forceUnlock) , change to "setAutoUnlock(bool)" modify update fix compile error adjust finish() adjust finish() add rcPrepare_ = succeeded adjust delete local processor adjust log use rcPrepare, rcRemote rcCommit fix resume add edges adjust UT disable ioThreadPoolForMeta_ make int64 vid printable adjust some log to vlog 2 only print prepare succeeded result only print readable in finish() of resume processor adjust some log some log not print term desc class name in uuid debug add some more log looks like factory may fail? add leader lease error code add check when get lock report leader lease do some clean change table prefix to NebulaKeyUtil Style change some print disable UT for short clean compile error disable pool monitor * unify add/delete finish() as update * not stable will add it back later * fix a clang warning * fix a clang10 warning 2 Co-authored-by: Sophie <84560950+Sophie-Xie@users.noreply.github.com> * disable add hosts into zone (#3825) Co-authored-by: Sophie <84560950+Sophie-Xie@users.noreply.github.com> * Check active zone before create space (#3822) Co-authored-by: Sophie <84560950+Sophie-Xie@users.noreply.github.com> * abandon upgrader for old version (#3818) Co-authored-by: Sophie <84560950+Sophie-Xie@users.noreply.github.com> * put dataVersionKey on create space for storage (#3817) * put dataVersionKey on create space for storage * address some comments Co-authored-by: Doodle <13706157+critical27@users.noreply.github.com> Co-authored-by: Sophie <84560950+Sophie-Xie@users.noreply.github.com> * Update PR template (#3809) Co-authored-by: Sophie <84560950+Sophie-Xie@users.noreply.github.com> * fix meta http replace host handler (#3794) * fix meta http replace host handler * fix http replace test and add zone test Co-authored-by: Sophie <84560950+Sophie-Xie@users.noreply.github.com> * Fix `Match cannot be followed by use space` (#3748) * fix bug * add tck * remove set * fix * rm header * fix * remove changes in match * fix * enhance annotation * fix review * fix * fix review * remove redundant Co-authored-by: Sophie <84560950+Sophie-Xie@users.noreply.github.com> Co-authored-by: cpw <13495049+CPWstatic@users.noreply.github.com> * support toSet function (#3594) add test Co-authored-by: Sophie <84560950+Sophie-Xie@users.noreply.github.com> * Enhance date parser (#3797) * parse date * enhance datetime * add test * fix review * rename Co-authored-by: Sophie <84560950+Sophie-Xie@users.noreply.github.com> * raft: fix always loop when no log need to send (#3819) Co-authored-by: Sophie <84560950+Sophie-Xie@users.noreply.github.com> Co-authored-by: Doodle <13706157+critical27@users.noreply.github.com> * Update CODEOWNERS (#3835) * Update CODEOWNERS * Update CODEOWNERS Confirm with sophie.xie * refactor AdminClient (#3781) * refactor AdminClient * fix test case, unify all getAdminAddrFromStoreAddr into AdminClient * add more test cases * address @panda-sheep's comment * Feature/optimizer trait match (#3769) * Add trait for pattern match. * Implement match plan by trait and reduce some reduncant rules. * Remove unused header. * Fix warning. * Let optimize rule decide collection of matched nodes. Co-authored-by: kyle.cao Co-authored-by: Sophie <84560950+Sophie-Xie@users.noreply.github.com> * Simplify datetime tostring. (#3712) * Simplify datetime tostring. * Remove unused code. * Fix error. Co-authored-by: Sophie <84560950+Sophie-Xie@users.noreply.github.com> * pragma once not allowd (#3842) Co-authored-by: Sophie <84560950+Sophie-Xie@users.noreply.github.com> * refactor LOG and add comment for meta, meta/processors/job (#3686) * refactor LOG and add comment for meta, meta/processors/job * refactor LOG and add comment for meta/processors/zone Co-authored-by: Doodle <13706157+critical27@users.noreply.github.com> * replace STRING to name_label for zone's name (#3780) Co-authored-by: Doodle <13706157+critical27@users.noreply.github.com> * Add test for rc. (#3847) * Add test for rc. * Fix cxx. Confirm with sophie.xie * cpp lint Co-authored-by: Yee <2520865+yixinglu@users.noreply.github.com> Co-authored-by: Sophie <84560950+Sophie-Xie@users.noreply.github.com> Co-authored-by: cpw <13495049+CPWstatic@users.noreply.github.com> Co-authored-by: hs.zhang <22708345+cangfengzhs@users.noreply.github.com> Co-authored-by: yaphet <4414314+darionyaphet@users.noreply.github.com> Co-authored-by: jakevin <30525741+jackwener@users.noreply.github.com> Co-authored-by: shylock <33566796+Shylock-Hg@users.noreply.github.com> Co-authored-by: Yichen Wang <18348405+Aiee@users.noreply.github.com> Co-authored-by: panda-sheep <59197347+panda-sheep@users.noreply.github.com> Co-authored-by: pengwei.song <90180021+pengweisong@users.noreply.github.com> Co-authored-by: Doodle <13706157+critical27@users.noreply.github.com> Co-authored-by: endy.li <25311962+heroicNeZha@users.noreply.github.com> Co-authored-by: jimingquan Co-authored-by: liwenhui-soul <38217397+liwenhui-soul@users.noreply.github.com> Co-authored-by: Alex Xing <90179377+SuperYoko@users.noreply.github.com> Co-authored-by: Harris.Chu <1726587+HarrisChu@users.noreply.github.com> Co-authored-by: lionel.liu@vesoft.com <52276794+liuyu85cn@users.noreply.github.com> Co-authored-by: kyle.cao --- src/clients/meta/stats/MetaClientStats.h | 5 +++-- src/clients/storage/StorageClient.h | 4 +++- src/clients/storage/StorageClientBase-inl.h | 4 +++- src/clients/storage/stats/StorageClientStats.h | 4 +++- src/codec/include/NebulaCodec.h | 4 +++- src/codec/test/RowWriterV1-inl.h | 4 +++- src/common/base/CollectNSucceeded-inl.h | 4 +++- src/common/base/ICord.h | 4 +++- src/common/datatypes/Duration.h | 4 +++- src/common/datatypes/DurationOps-inl.h | 4 +++- src/common/datatypes/Geography.h | 4 +++- src/common/geo/GeoFunction.h | 4 +++- src/common/geo/GeoIndex.h | 4 +++- src/common/geo/GeoUtils.h | 4 +++- src/common/geo/io/CMakeLists.txt | 14 +++++++++++--- src/common/geo/io/wkb/ByteOrder.h | 4 +++- src/common/geo/io/wkb/ByteOrderDataIOStream.h | 4 +++- src/common/geo/io/wkb/WKBReader.h | 4 +++- src/common/geo/io/wkb/WKBWriter.h | 4 +++- src/common/geo/io/wkt/WKTReader.h | 4 +++- src/common/geo/io/wkt/WKTScanner.h | 4 +++- src/common/geo/io/wkt/WKTWriter.h | 4 +++- src/common/log/LogMonitor.h | 4 +++- src/common/memory/MemoryUtils.h | 4 +++- src/common/ssl/SSLConfig.h | 4 +++- src/common/stats/StatsManager-inl.h | 4 +++- src/common/thrift/ThriftClientManager-inl.h | 4 +++- src/common/thrift/ThriftLocalClientManager.h | 4 +++- src/common/time/Constants.h | 4 +++- src/common/time/ScopedTimer.h | 4 +++- src/common/time/parser/CMakeLists.txt | 14 +++++++++++--- src/common/time/parser/DatetimeReader.h | 4 +++- src/common/time/parser/DatetimeScanner.h | 4 +++- src/common/utils/MemoryLockCore.h | 4 +++- src/common/utils/MemoryLockWrapper.h | 4 +++- src/daemons/MetaDaemonInit.h | 4 +++- src/graph/executor/admin/ShowMetaLeaderExecutor.h | 4 +++- src/graph/executor/logic/ArgumentExecutor.h | 4 +++- src/graph/executor/query/SampleExecutor.h | 4 +++- src/graph/executor/query/ScanVerticesExecutor.h | 4 +++- .../rule/GeoPredicateEdgeIndexScanRule.h | 4 +++- .../rule/GeoPredicateIndexScanBaseRule.h | 4 +++- .../optimizer/rule/GeoPredicateTagIndexScanRule.h | 4 +++- src/graph/optimizer/rule/GetEdgesTransformRule.h | 4 +++- .../rule/PushFilterDownScanVerticesRule.h | 4 +++- .../rule/PushLimitDownGetNeighborsRule.h | 4 +++- .../optimizer/rule/PushLimitDownIndexScanRule.h | 4 +++- .../optimizer/rule/PushLimitDownProjectRule.h | 4 +++- .../rule/PushLimitDownScanAppendVerticesRule.h | 4 +++- .../PushLimitDownScanEdgesAppendVerticesRule.h | 4 +++- .../rule/PushStepLimitDownGetNeighborsRule.h | 4 +++- .../rule/PushStepSampleDownGetNeighborsRule.h | 4 +++- .../optimizer/rule/PushTopNDownIndexScanRule.h | 4 +++- .../rule/PushVFilterDownScanVerticesRule.h | 4 +++- src/graph/planner/match/ArgumentFinder.h | 4 +++- src/graph/planner/match/ScanSeek.h | 4 +++- src/graph/planner/ngql/MaintainPlanner.h | 4 +++- src/graph/stats/GraphStats.h | 4 +++- src/kvstore/NebulaSnapshotManager.h | 4 +++- src/kvstore/RateLimiter.h | 4 +++- src/kvstore/raftex/RaftLogIterator.h | 4 +++- src/kvstore/stats/KVStats.h | 4 +++- src/meta/http/MetaHttpReplaceHostHandler.h | 4 +++- src/meta/processors/BaseProcessor-inl.h | 4 +++- src/meta/processors/admin/AgentHBProcessor.h | 4 +++- .../processors/parts/CreateSpaceAsProcessor.h | 4 +++- src/meta/stats/MetaStats.h | 4 +++- src/meta/upgrade/MetaDataUpgrade.h | 5 +++-- src/mock/LocalServer.h | 4 +++- src/parser/CMakeLists.txt | 15 +++++++++++---- src/storage/BaseProcessor-inl.h | 4 +++- src/storage/ExprVisitorBase.h | 4 +++- src/storage/GraphStorageLocalServer.h | 4 +++- src/storage/exec/IndexAggregateNode.h | 4 +++- src/storage/exec/IndexDedupNode.h | 4 +++- src/storage/exec/IndexEdgeScanNode.h | 4 +++- src/storage/exec/IndexExprContext.h | 4 +++- src/storage/exec/IndexLimitNode.h | 4 +++- src/storage/exec/IndexNode.h | 4 +++- src/storage/exec/IndexProjectionNode.h | 4 +++- src/storage/exec/IndexScanNode.h | 4 +++- src/storage/exec/IndexSelectionNode.h | 4 +++- src/storage/exec/IndexTopNNode.h | 4 +++- src/storage/exec/IndexVertexScanNode.h | 4 +++- src/storage/exec/MultiTagNode.h | 4 +++- src/storage/exec/ScanNode.h | 4 +++- src/storage/http/StorageHttpPropertyHandler.h | 4 +++- src/storage/index/LookupProcessor.h | 4 +++- src/storage/stats/StorageStats.h | 4 +++- src/storage/test/ChainTestUtils.h | 4 +++- src/storage/test/IndexTestUtil.h | 4 +++- src/storage/test/TossTestExecutor.h | 4 +++- src/storage/test/TossTestUtils.h | 4 +++- .../transaction/ChainAddEdgesGroupProcessor.h | 4 +++- .../transaction/ChainAddEdgesLocalProcessor.h | 4 +++- .../transaction/ChainAddEdgesRemoteProcessor.h | 4 +++- src/storage/transaction/ChainBaseProcessor.h | 4 +++- .../transaction/ChainDeleteEdgesGroupProcessor.h | 4 +++- .../transaction/ChainDeleteEdgesLocalProcessor.h | 4 +++- .../transaction/ChainDeleteEdgesRemoteProcessor.h | 4 +++- .../transaction/ChainDeleteEdgesResumeProcessor.h | 4 +++- .../ChainDeleteEdgesResumeRemoteProcessor.h | 4 +++- src/storage/transaction/ChainProcessorFactory.h | 4 +++- .../ChainResumeAddDoublePrimeProcessor.h | 4 +++- .../transaction/ChainResumeAddPrimeProcessor.h | 4 +++- .../ChainResumeUpdateDoublePrimeProcessor.h | 4 +++- .../transaction/ChainResumeUpdatePrimeProcessor.h | 4 +++- .../transaction/ChainUpdateEdgeLocalProcessor.h | 4 +++- .../transaction/ChainUpdateEdgeRemoteProcessor.h | 4 +++- src/storage/transaction/ConsistTypes.h | 4 +++- src/storage/transaction/ConsistUtil.h | 4 +++- src/storage/transaction/TransactionManager.h | 4 +++- src/tools/db-upgrade/NebulaKeyUtilsV3.h | 4 +++- 113 files changed, 363 insertions(+), 122 deletions(-) diff --git a/src/clients/meta/stats/MetaClientStats.h b/src/clients/meta/stats/MetaClientStats.h index 46fa1497931..9e55d3741e5 100644 --- a/src/clients/meta/stats/MetaClientStats.h +++ b/src/clients/meta/stats/MetaClientStats.h @@ -3,8 +3,8 @@ * This source code is licensed under Apache 2.0 License. */ -#pragma once - +#ifndef CLIENTIS_META_STATS_METACLIENTSTATS_H +#define CLIENTIS_META_STATS_METACLIENTSTATS_H #include "common/stats/StatsManager.h" namespace nebula { @@ -15,3 +15,4 @@ extern stats::CounterId kNumRpcSentToMetadFailed; void initMetaClientStats(); } // namespace nebula +#endif diff --git a/src/clients/storage/StorageClient.h b/src/clients/storage/StorageClient.h index 6b564116815..3561bad545d 100644 --- a/src/clients/storage/StorageClient.h +++ b/src/clients/storage/StorageClient.h @@ -3,7 +3,8 @@ * This source code is licensed under Apache 2.0 License. */ -#pragma once +#ifndef CLIENTS_STORAGE_STORAGECLIENT_H +#define CLIENTS_STORAGE_STORAGECLIENT_H #include @@ -192,3 +193,4 @@ class StorageClient } // namespace storage } // namespace nebula +#endif diff --git a/src/clients/storage/StorageClientBase-inl.h b/src/clients/storage/StorageClientBase-inl.h index eb0c43472e0..00405c3a6f2 100644 --- a/src/clients/storage/StorageClientBase-inl.h +++ b/src/clients/storage/StorageClientBase-inl.h @@ -3,7 +3,8 @@ * This source code is licensed under Apache 2.0 License. */ -#pragma once +#ifndef CLIENTS_STORAGE_STORAGECLIENTBASE_INL_H +#define CLIENTS_STORAGE_STORAGECLIENTBASE_INL_H #include @@ -379,3 +380,4 @@ StorageClientBase::getHostPartsWithCursor( } // namespace storage } // namespace nebula +#endif diff --git a/src/clients/storage/stats/StorageClientStats.h b/src/clients/storage/stats/StorageClientStats.h index 9c2e3567e4d..c3a5a6f0906 100644 --- a/src/clients/storage/stats/StorageClientStats.h +++ b/src/clients/storage/stats/StorageClientStats.h @@ -3,7 +3,8 @@ * This source code is licensed under Apache 2.0 License. */ -#pragma once +#ifndef CLIENTS_STORAGE_STATS_STORAGECLIENTSTATS_H +#define CLIENTS_STORAGE_STATS_STORAGECLIENTSTATS_H #include "common/stats/StatsManager.h" @@ -15,3 +16,4 @@ extern stats::CounterId kNumRpcSentToStoragedFailed; void initStorageClientStats(); } // namespace nebula +#endif diff --git a/src/codec/include/NebulaCodec.h b/src/codec/include/NebulaCodec.h index 01ee14cd43b..3936173fb6d 100644 --- a/src/codec/include/NebulaCodec.h +++ b/src/codec/include/NebulaCodec.h @@ -3,7 +3,8 @@ * This source code is licensed under Apache 2.0 License. */ -#pragma once +#ifndef CODEC_INCLUDE_NEBULACODEC_H +#define CODEC_INCLUDE_NEBULACODEC_H #include "common/base/StatusOr.h" #include "common/meta/SchemaProviderIf.h" @@ -24,3 +25,4 @@ class NebulaCodec { }; } // namespace nebula +#endif diff --git a/src/codec/test/RowWriterV1-inl.h b/src/codec/test/RowWriterV1-inl.h index ac95c4f8254..5ccf36ebf12 100644 --- a/src/codec/test/RowWriterV1-inl.h +++ b/src/codec/test/RowWriterV1-inl.h @@ -3,7 +3,8 @@ * This source code is licensed under Apache 2.0 License. */ -#pragma once +#ifndef CODEC_TEST_ROWWRITERV1_INL_H +#define CODEC_TEST_ROWWRITERV1_INL_H namespace nebula { @@ -45,3 +46,4 @@ typename std::enable_if::value>::type RowWriterV1::writeInt( } } // namespace nebula +#endif diff --git a/src/common/base/CollectNSucceeded-inl.h b/src/common/base/CollectNSucceeded-inl.h index c7c138f4229..df20bcdd6ae 100644 --- a/src/common/base/CollectNSucceeded-inl.h +++ b/src/common/base/CollectNSucceeded-inl.h @@ -3,7 +3,8 @@ * This source code is licensed under Apache 2.0 License. */ -#pragma once +#ifndef COMMON_BASE_COLLECTNSUCCEEDED_INL_H +#define COMMON_BASE_COLLECTNSUCCEEDED_INL_H #include @@ -67,3 +68,4 @@ folly::Future> collectNSucceeded(FutureIter firs } } // namespace nebula +#endif diff --git a/src/common/base/ICord.h b/src/common/base/ICord.h index dee5d18498f..f4d821ecabd 100644 --- a/src/common/base/ICord.h +++ b/src/common/base/ICord.h @@ -3,7 +3,8 @@ * This source code is licensed under Apache 2.0 License. */ -#pragma once +#ifndef COMMON_BASE_ICORD_H +#define COMMON_BASE_ICORD_H #include "common/base/Base.h" @@ -244,3 +245,4 @@ class ICord { }; } // namespace nebula +#endif diff --git a/src/common/datatypes/Duration.h b/src/common/datatypes/Duration.h index b5d9247b3f0..4ff7fd066c8 100644 --- a/src/common/datatypes/Duration.h +++ b/src/common/datatypes/Duration.h @@ -3,7 +3,8 @@ * This source code is licensed under Apache 2.0 License. */ -#pragma once +#ifndef COMMON_DATATYPES_DURATION_H +#define COMMON_DATATYPES_DURATION_H #include @@ -150,3 +151,4 @@ struct hash { }; } // namespace std +#endif diff --git a/src/common/datatypes/DurationOps-inl.h b/src/common/datatypes/DurationOps-inl.h index 79a6418e575..f5251730bcf 100644 --- a/src/common/datatypes/DurationOps-inl.h +++ b/src/common/datatypes/DurationOps-inl.h @@ -3,7 +3,8 @@ * This source code is licensed under Apache 2.0 License. */ -#pragma once +#ifndef COMMON_DATATYPES_DURATIONOPS_INL_H +#define COMMON_DATATYPES_DURATIONOPS_INL_H #include #include @@ -199,3 +200,4 @@ uint32_t Cpp2Ops::serializedSizeZC(Protocol const* proto, } // namespace thrift } // namespace apache +#endif diff --git a/src/common/datatypes/Geography.h b/src/common/datatypes/Geography.h index f3d05cb41c3..259a0508482 100644 --- a/src/common/datatypes/Geography.h +++ b/src/common/datatypes/Geography.h @@ -3,7 +3,8 @@ * This source code is licensed under Apache 2.0 License. */ -#pragma once +#ifndef COMMON_DATATYPES_GEOGRAPHY_H +#define COMMON_DATATYPES_GEOGRAPHY_H #include #include @@ -239,3 +240,4 @@ struct hash { }; } // namespace std +#endif diff --git a/src/common/geo/GeoFunction.h b/src/common/geo/GeoFunction.h index 13ca643f48e..a961f47a621 100644 --- a/src/common/geo/GeoFunction.h +++ b/src/common/geo/GeoFunction.h @@ -3,7 +3,8 @@ * This source code is licensed under Apache 2.0 License. */ -#pragma once +#ifndef COMMON_GEO_GEOFUNCTION_H +#define COMMON_GEO_GEOFUNCTION_H #include @@ -73,3 +74,4 @@ class GeoFunction { } // namespace geo } // namespace nebula +#endif diff --git a/src/common/geo/GeoIndex.h b/src/common/geo/GeoIndex.h index d6dc47961c6..3b1c7e618f4 100644 --- a/src/common/geo/GeoIndex.h +++ b/src/common/geo/GeoIndex.h @@ -3,7 +3,8 @@ * This source code is licensed under Apache 2.0 License. */ -#pragma once +#ifndef COMMON_GEO_GEOINDEX_H +#define COMMON_GEO_GEOINDEX_H #include @@ -101,3 +102,4 @@ struct hash { }; } // namespace std +#endif diff --git a/src/common/geo/GeoUtils.h b/src/common/geo/GeoUtils.h index 9421fcbe855..f0299778e47 100644 --- a/src/common/geo/GeoUtils.h +++ b/src/common/geo/GeoUtils.h @@ -3,7 +3,8 @@ * This source code is licensed under Apache 2.0 License. */ -#pragma once +#ifndef COMMON_GEO_GEOUTILS_H +#define COMMON_GEO_GEOUTILS_H #include #include @@ -96,3 +97,4 @@ class GeoUtils final { } // namespace geo } // namespace nebula +#endif diff --git a/src/common/geo/io/CMakeLists.txt b/src/common/geo/io/CMakeLists.txt index b0bdbf76249..103610a028c 100644 --- a/src/common/geo/io/CMakeLists.txt +++ b/src/common/geo/io/CMakeLists.txt @@ -2,10 +2,18 @@ # # This source code is licensed under Apache 2.0 License. -if(ENABLE_VERBOSE_BISON) - set(bison_flags "-Werror -v") +if(ENABLE_ERROR) + if(ENABLE_VERBOSE_BISON) + set(bison_flags "-Werror -v") + else() + set(bison_flags "-Werror") + endif() else() - set(bison_flags "-Werror") + if(ENABLE_VERBOSE_BISON) + set(bison_flags "-v") + else() + set(bison_flags "") + endif() endif() bison_target(Parser wkt/wkt_parser.yy ${CMAKE_CURRENT_BINARY_DIR}/wkt/WKTParser.cpp COMPILE_FLAGS ${bison_flags}) flex_target(Scanner wkt/wkt_scanner.lex ${CMAKE_CURRENT_BINARY_DIR}/wkt/WKTScanner.cpp) diff --git a/src/common/geo/io/wkb/ByteOrder.h b/src/common/geo/io/wkb/ByteOrder.h index ac7497851b8..2513437792d 100644 --- a/src/common/geo/io/wkb/ByteOrder.h +++ b/src/common/geo/io/wkb/ByteOrder.h @@ -3,7 +3,8 @@ * This source code is licensed under Apache 2.0 License. */ -#pragma once +#ifndef COMMON_GEO_IO_WKB_BYTEORDER_H +#define COMMON_GEO_IO_WKB_BYTEORDER_H #include @@ -76,3 +77,4 @@ struct ByteOrderData { } // namespace geo } // namespace nebula +#endif diff --git a/src/common/geo/io/wkb/ByteOrderDataIOStream.h b/src/common/geo/io/wkb/ByteOrderDataIOStream.h index 193fde71435..438e341b5b9 100644 --- a/src/common/geo/io/wkb/ByteOrderDataIOStream.h +++ b/src/common/geo/io/wkb/ByteOrderDataIOStream.h @@ -3,7 +3,8 @@ * This source code is licensed under Apache 2.0 License. */ -#pragma once +#ifndef COMMON_GEO_IO_WKB_BYTEORDERDATAIOSTREAM_H +#define COMMON_GEO_IO_WKB_BYTEORDERDATAIOSTREAM_H #include @@ -73,3 +74,4 @@ class ByteOrderDataOutStream { } // namespace geo } // namespace nebula +#endif diff --git a/src/common/geo/io/wkb/WKBReader.h b/src/common/geo/io/wkb/WKBReader.h index bfe7b33ce3c..ad80870cbbc 100644 --- a/src/common/geo/io/wkb/WKBReader.h +++ b/src/common/geo/io/wkb/WKBReader.h @@ -3,7 +3,8 @@ * This source code is licensed under Apache 2.0 License. */ -#pragma once +#ifndef COMMON_GEO_IO_WKB_WKBREADER_H +#define COMMON_GEO_IO_WKB_WKBREADER_H #include "common/base/Base.h" #include "common/base/StatusOr.h" @@ -45,3 +46,4 @@ class WKBReader { } // namespace geo } // namespace nebula +#endif diff --git a/src/common/geo/io/wkb/WKBWriter.h b/src/common/geo/io/wkb/WKBWriter.h index ef93f0a9522..c37daf88d85 100644 --- a/src/common/geo/io/wkb/WKBWriter.h +++ b/src/common/geo/io/wkb/WKBWriter.h @@ -3,7 +3,8 @@ * This source code is licensed under Apache 2.0 License. */ -#pragma once +#ifndef COMMON_GEO_IO_WKB_WKBWRITER_H +#define COMMON_GEO_IO_WKB_WKBWRITER_H #include "common/base/Base.h" #include "common/datatypes/Geography.h" @@ -43,3 +44,4 @@ class WKBWriter { } // namespace geo } // namespace nebula +#endif diff --git a/src/common/geo/io/wkt/WKTReader.h b/src/common/geo/io/wkt/WKTReader.h index c880852e324..b1fc8f76cef 100644 --- a/src/common/geo/io/wkt/WKTReader.h +++ b/src/common/geo/io/wkt/WKTReader.h @@ -3,7 +3,8 @@ * This source code is licensed under Apache 2.0 License. */ -#pragma once +#ifndef COMMON_GEO_IO_WKT_WKTREADER_H +#define COMMON_GEO_IO_WKT_WKTREADER_H #include "common/base/Base.h" #include "common/base/StatusOr.h" @@ -81,3 +82,4 @@ class WKTReader { } // namespace geo } // namespace nebula +#endif diff --git a/src/common/geo/io/wkt/WKTScanner.h b/src/common/geo/io/wkt/WKTScanner.h index 4d8abf027e8..6664238c893 100644 --- a/src/common/geo/io/wkt/WKTScanner.h +++ b/src/common/geo/io/wkt/WKTScanner.h @@ -3,7 +3,8 @@ * This source code is licensed under Apache 2.0 License. */ -#pragma once +#ifndef COMMON_GEO_IO_WKT_WKTSCANNER_H +#define COMMON_GEO_IO_WKT_WKTSCANNER_H #include "common/base/Base.h" @@ -75,3 +76,4 @@ class WKTScanner : public yyFlexLexer { } // namespace geo } // namespace nebula +#endif diff --git a/src/common/geo/io/wkt/WKTWriter.h b/src/common/geo/io/wkt/WKTWriter.h index bd870ef6fc8..42b8ed46d1a 100644 --- a/src/common/geo/io/wkt/WKTWriter.h +++ b/src/common/geo/io/wkt/WKTWriter.h @@ -3,7 +3,8 @@ * This source code is licensed under Apache 2.0 License. */ -#pragma once +#ifndef COMMON_GEO_IO_WKT_WKTWRITER_H +#define COMMON_GEO_IO_WKT_WKTWRITER_H #include "common/base/Base.h" #include "common/datatypes/Geography.h" @@ -31,3 +32,4 @@ class WKTWriter { } // namespace geo } // namespace nebula +#endif diff --git a/src/common/log/LogMonitor.h b/src/common/log/LogMonitor.h index 86e206e1930..dd0744273b4 100644 --- a/src/common/log/LogMonitor.h +++ b/src/common/log/LogMonitor.h @@ -2,7 +2,8 @@ * * This source code is licensed under Apache 2.0 License. */ -#pragma once +#ifndef COMMON_LOG_LOGMONITOR_H +#define COMMON_LOG_LOGMONITOR_H #include #include @@ -41,3 +42,4 @@ class LogMonitor { }; } // namespace nebula +#endif diff --git a/src/common/memory/MemoryUtils.h b/src/common/memory/MemoryUtils.h index 2f2df2c6220..25a46c7a2a5 100644 --- a/src/common/memory/MemoryUtils.h +++ b/src/common/memory/MemoryUtils.h @@ -3,7 +3,8 @@ * This source code is licensed under Apache 2.0 License. */ -#pragma once +#ifndef COMMON_MEMORY_MEMORYUTILS_H +#define COMMON_MEMORY_MEMORYUTILS_H #include #include @@ -33,3 +34,4 @@ class MemoryUtils final { }; } // namespace nebula +#endif diff --git a/src/common/ssl/SSLConfig.h b/src/common/ssl/SSLConfig.h index 8ffbda3b980..5aff0fb5b65 100644 --- a/src/common/ssl/SSLConfig.h +++ b/src/common/ssl/SSLConfig.h @@ -4,7 +4,8 @@ * This source code is licensed under Apache 2.0 License. */ -#pragma once +#ifndef COMMON_SSL_SSLCONFIG_H +#define COMMON_SSL_SSLCONFIG_H #include #include @@ -23,3 +24,4 @@ extern std::shared_ptr sslContextConfig(); extern std::shared_ptr createSSLContext(); } // namespace nebula +#endif diff --git a/src/common/stats/StatsManager-inl.h b/src/common/stats/StatsManager-inl.h index a50fbf9ade9..05ac7d404d0 100644 --- a/src/common/stats/StatsManager-inl.h +++ b/src/common/stats/StatsManager-inl.h @@ -3,7 +3,8 @@ * This source code is licensed under Apache 2.0 License. */ -#pragma once +#ifndef COMMON_STATS_STATSMANAGER_INL_H +#define COMMON_STATS_STATSMANAGER_INL_H namespace nebula { namespace stats { @@ -30,3 +31,4 @@ StatsManager::VT StatsManager::readValue(StatsHolder& stats, } // namespace stats } // namespace nebula +#endif diff --git a/src/common/thrift/ThriftClientManager-inl.h b/src/common/thrift/ThriftClientManager-inl.h index 4b6dfd0ef6f..88b2bcdd48d 100644 --- a/src/common/thrift/ThriftClientManager-inl.h +++ b/src/common/thrift/ThriftClientManager-inl.h @@ -3,7 +3,8 @@ * This source code is licensed under Apache 2.0 License. */ -#pragma once +#ifndef COMMON_THRIFT_THRIFTCLIENTMANAGER_INL_H +#define COMMON_THRIFT_THRIFTCLIENTMANAGER_INL_H #include #include @@ -99,3 +100,4 @@ std::shared_ptr ThriftClientManager::client(const HostAd } // namespace thrift } // namespace nebula +#endif diff --git a/src/common/thrift/ThriftLocalClientManager.h b/src/common/thrift/ThriftLocalClientManager.h index c7229937056..6a6432a968c 100644 --- a/src/common/thrift/ThriftLocalClientManager.h +++ b/src/common/thrift/ThriftLocalClientManager.h @@ -2,7 +2,8 @@ * * This source code is licensed under Apache 2.0 License. */ -#pragma once +#ifndef COMMON_THRIFT_THRIFTLOCALCLIENTMANAGER_H +#define COMMON_THRIFT_THRIFTLOCALCLIENTMANAGER_H #include #include @@ -37,3 +38,4 @@ class LocalClientManager final { }; } // namespace thrift } // namespace nebula +#endif diff --git a/src/common/time/Constants.h b/src/common/time/Constants.h index c6fde825fbf..985d651e456 100644 --- a/src/common/time/Constants.h +++ b/src/common/time/Constants.h @@ -3,7 +3,8 @@ * This source code is licensed under Apache 2.0 License. */ -#pragma once +#ifndef COMMON_TIME_CONSTANTS_H +#define COMMON_TIME_CONSTANTS_H namespace nebula { namespace time { @@ -17,3 +18,4 @@ static constexpr int64_t kSecondsOfDay = 24 * kSecondsOfHour; } // namespace time } // namespace nebula +#endif diff --git a/src/common/time/ScopedTimer.h b/src/common/time/ScopedTimer.h index b6a2230f4c8..bfc9ef243b8 100644 --- a/src/common/time/ScopedTimer.h +++ b/src/common/time/ScopedTimer.h @@ -3,7 +3,8 @@ * This source code is licensed under Apache 2.0 License. */ -#pragma once +#ifndef COMMON_TIME_SCOPEDTIMER_H +#define COMMON_TIME_SCOPEDTIMER_H #include @@ -54,3 +55,4 @@ class ScopedTimer final { #define CONCAT_IMPL(x, y) x##y #define MACRO_CONCAT(x, y) CONCAT_IMPL(x, y) #define SCOPED_TIMER(v) ::nebula::ScopedTimer MACRO_CONCAT(_SCOPED_TIMER_, __LINE__)(v) +#endif diff --git a/src/common/time/parser/CMakeLists.txt b/src/common/time/parser/CMakeLists.txt index 5167484655b..783b86be79e 100644 --- a/src/common/time/parser/CMakeLists.txt +++ b/src/common/time/parser/CMakeLists.txt @@ -2,10 +2,18 @@ # # This source code is licensed under Apache 2.0 License. -if(ENABLE_VERBOSE_BISON) - set(bison_flags "-Werror -v") +if(ENABLE_ERROR) + if(ENABLE_VERBOSE_BISON) + set(bison_flags "-Werror -v") + else() + set(bison_flags "-Werror") + endif() else() - set(bison_flags "-Werror") + if(ENABLE_VERBOSE_BISON) + set(bison_flags "-v") + else() + set(bison_flags "") + endif() endif() bison_target(Parser datetime_parser.yy ${CMAKE_CURRENT_BINARY_DIR}/DatetimeParser.cpp COMPILE_FLAGS ${bison_flags}) flex_target(Scanner datetime_scanner.lex ${CMAKE_CURRENT_BINARY_DIR}/DatetimeScanner.cpp) diff --git a/src/common/time/parser/DatetimeReader.h b/src/common/time/parser/DatetimeReader.h index 70218e5a50c..248c66c00f6 100644 --- a/src/common/time/parser/DatetimeReader.h +++ b/src/common/time/parser/DatetimeReader.h @@ -3,7 +3,8 @@ * This source code is licensed under Apache 2.0 License. */ -#pragma once +#ifndef COMMON_TIME_PARSER_DATETIMEREADER_H +#define COMMON_TIME_PARSER_DATETIMEREADER_H #include "common/base/Base.h" #include "common/base/StatusOr.h" @@ -59,3 +60,4 @@ class DatetimeReader { } // namespace time } // namespace nebula +#endif diff --git a/src/common/time/parser/DatetimeScanner.h b/src/common/time/parser/DatetimeScanner.h index 2661b3480a0..f36332eafe5 100644 --- a/src/common/time/parser/DatetimeScanner.h +++ b/src/common/time/parser/DatetimeScanner.h @@ -3,7 +3,8 @@ * This source code is licensed under Apache 2.0 License. */ -#pragma once +#ifndef COMMON_TIME_PARSER_DATETIMESCANNER_H +#define COMMON_TIME_PARSER_DATETIMESCANNER_H #include "common/base/Base.h" @@ -74,3 +75,4 @@ class DatetimeScanner : public yyFlexLexer { } // namespace time } // namespace nebula +#endif diff --git a/src/common/utils/MemoryLockCore.h b/src/common/utils/MemoryLockCore.h index ebd6290b6cd..9527e075239 100644 --- a/src/common/utils/MemoryLockCore.h +++ b/src/common/utils/MemoryLockCore.h @@ -3,7 +3,8 @@ * This source code is licensed under Apache 2.0 License. */ -#pragma once +#ifndef COMMON_UTILS_MEMORYLOCKCORE_H +#define COMMON_UTILS_MEMORYLOCKCORE_H #include @@ -79,3 +80,4 @@ class MemoryLockCore { }; } // namespace nebula +#endif diff --git a/src/common/utils/MemoryLockWrapper.h b/src/common/utils/MemoryLockWrapper.h index 5378a6d0a0b..38494e786eb 100644 --- a/src/common/utils/MemoryLockWrapper.h +++ b/src/common/utils/MemoryLockWrapper.h @@ -3,7 +3,8 @@ * This source code is licensed under Apache 2.0 License. */ -#pragma once +#ifndef COMMON_UTILS_MEMORYLOCKWRAPPER_H +#define COMMON_UTILS_MEMORYLOCKWRAPPER_H #include @@ -84,3 +85,4 @@ class MemoryLockGuard { }; } // namespace nebula +#endif diff --git a/src/daemons/MetaDaemonInit.h b/src/daemons/MetaDaemonInit.h index 02dfa6f4eb4..3d40ded967e 100644 --- a/src/daemons/MetaDaemonInit.h +++ b/src/daemons/MetaDaemonInit.h @@ -2,7 +2,8 @@ * * This source code is licensed under Apache 2.0 License. */ -#pragma once +#ifndef DAEMONS_METADAEMONINIT_H +#define DAEMONS_METADAEMONINIT_H #include @@ -20,3 +21,4 @@ nebula::Status initWebService(nebula::WebService* svc, nebula::kvstore::KVStore* kvstore, nebula::hdfs::HdfsCommandHelper* helper, nebula::thread::GenericThreadPool* pool); +#endif diff --git a/src/graph/executor/admin/ShowMetaLeaderExecutor.h b/src/graph/executor/admin/ShowMetaLeaderExecutor.h index 2ba2a3a01f6..fe3a2f2b074 100644 --- a/src/graph/executor/admin/ShowMetaLeaderExecutor.h +++ b/src/graph/executor/admin/ShowMetaLeaderExecutor.h @@ -3,7 +3,8 @@ * This source code is licensed under Apache 2.0 License. */ -#pragma once +#ifndef GRAPH_EXECUTOR_ADMIN_SHOWMETALEADEREXECUTOR_H +#define GRAPH_EXECUTOR_ADMIN_SHOWMETALEADEREXECUTOR_H #include "graph/executor/Executor.h" @@ -20,3 +21,4 @@ class ShowMetaLeaderExecutor final : public Executor { } // namespace graph } // namespace nebula +#endif diff --git a/src/graph/executor/logic/ArgumentExecutor.h b/src/graph/executor/logic/ArgumentExecutor.h index a8d04538bb4..7c6e7eea828 100644 --- a/src/graph/executor/logic/ArgumentExecutor.h +++ b/src/graph/executor/logic/ArgumentExecutor.h @@ -3,7 +3,8 @@ * This source code is licensed under Apache 2.0 License. */ -#pragma once +#ifndef GRAPH_EXECUTOR_LOGIC_ARGUMENTEXECUTOR_H +#define GRAPH_EXECUTOR_LOGIC_ARGUMENTEXECUTOR_H #include "graph/executor/Executor.h" @@ -20,3 +21,4 @@ class ArgumentExecutor final : public Executor { } // namespace graph } // namespace nebula +#endif diff --git a/src/graph/executor/query/SampleExecutor.h b/src/graph/executor/query/SampleExecutor.h index 81b1aed12d9..3eef2569d3c 100644 --- a/src/graph/executor/query/SampleExecutor.h +++ b/src/graph/executor/query/SampleExecutor.h @@ -3,7 +3,8 @@ * This source code is licensed under Apache 2.0 License. */ -#pragma once +#ifndef GRAPH_EXECUTOR_QUERY_SAMPLEEXECUTOR_H +#define GRAPH_EXECUTOR_QUERY_SAMPLEEXECUTOR_H #include "graph/executor/Executor.h" @@ -20,3 +21,4 @@ class SampleExecutor final : public Executor { } // namespace graph } // namespace nebula +#endif diff --git a/src/graph/executor/query/ScanVerticesExecutor.h b/src/graph/executor/query/ScanVerticesExecutor.h index 1b46cc84549..bbe6df30cd3 100644 --- a/src/graph/executor/query/ScanVerticesExecutor.h +++ b/src/graph/executor/query/ScanVerticesExecutor.h @@ -3,7 +3,8 @@ * This source code is licensed under Apache 2.0 License. */ -#pragma once +#ifndef GRAPH_EXECUTOR_QUERY_SCANVERTICESEXECUTOR_H +#define GRAPH_EXECUTOR_QUERY_SCANVERTICESEXECUTOR_H #include "graph/executor/query/GetPropExecutor.h" #include "graph/planner/plan/Query.h" @@ -24,3 +25,4 @@ class ScanVerticesExecutor final : public GetPropExecutor { } // namespace graph } // namespace nebula +#endif diff --git a/src/graph/optimizer/rule/GeoPredicateEdgeIndexScanRule.h b/src/graph/optimizer/rule/GeoPredicateEdgeIndexScanRule.h index bc9c62a44ed..75f87ab7904 100644 --- a/src/graph/optimizer/rule/GeoPredicateEdgeIndexScanRule.h +++ b/src/graph/optimizer/rule/GeoPredicateEdgeIndexScanRule.h @@ -3,7 +3,8 @@ * This source code is licensed under Apache 2.0 License. */ -#pragma once +#ifndef GRAPH_OPTIMIZER_RULE_GEOPREDICATEEDGEINDEXSCANRULE_H +#define GRAPH_OPTIMIZER_RULE_GEOPREDICATEEDGEINDEXSCANRULE_H #include "graph/optimizer/rule/GeoPredicateIndexScanBaseRule.h" @@ -23,3 +24,4 @@ class GeoPredicateEdgeIndexScanRule final : public GeoPredicateIndexScanBaseRule } // namespace opt } // namespace nebula +#endif diff --git a/src/graph/optimizer/rule/GeoPredicateIndexScanBaseRule.h b/src/graph/optimizer/rule/GeoPredicateIndexScanBaseRule.h index ac7f12b5c1e..fdf4f4fab3f 100644 --- a/src/graph/optimizer/rule/GeoPredicateIndexScanBaseRule.h +++ b/src/graph/optimizer/rule/GeoPredicateIndexScanBaseRule.h @@ -3,7 +3,8 @@ * This source code is licensed under Apache 2.0 License. */ -#pragma once +#ifndef GRAPH_OPTIMIZER_RULE_GEOPREDICATEINDEXSCANBASERULE_H +#define GRAPH_OPTIMIZER_RULE_GEOPREDICATEINDEXSCANBASERULE_H #include "graph/optimizer/OptRule.h" @@ -18,3 +19,4 @@ class GeoPredicateIndexScanBaseRule : public OptRule { } // namespace opt } // namespace nebula +#endif diff --git a/src/graph/optimizer/rule/GeoPredicateTagIndexScanRule.h b/src/graph/optimizer/rule/GeoPredicateTagIndexScanRule.h index 57720ea1d3e..77d6e4b4fcb 100644 --- a/src/graph/optimizer/rule/GeoPredicateTagIndexScanRule.h +++ b/src/graph/optimizer/rule/GeoPredicateTagIndexScanRule.h @@ -3,7 +3,8 @@ * This source code is licensed under Apache 2.0 License. */ -#pragma once +#ifndef GRAPH_OPTIMIZER_RULE_GEOPREDICATETAGINDEXSCANRULE_H +#define GRAPH_OPTIMIZER_RULE_GEOPREDICATETAGINDEXSCANRULE_H #include "graph/optimizer/rule/GeoPredicateIndexScanBaseRule.h" @@ -23,3 +24,4 @@ class GeoPredicateTagIndexScanRule final : public GeoPredicateIndexScanBaseRule } // namespace opt } // namespace nebula +#endif diff --git a/src/graph/optimizer/rule/GetEdgesTransformRule.h b/src/graph/optimizer/rule/GetEdgesTransformRule.h index 86492a44fa7..5e03612eb0c 100644 --- a/src/graph/optimizer/rule/GetEdgesTransformRule.h +++ b/src/graph/optimizer/rule/GetEdgesTransformRule.h @@ -3,7 +3,8 @@ * This source code is licensed under Apache 2.0 License. */ -#pragma once +#ifndef GRAPH_OPTIMIZER_RULE_GETEDGESTRANSFORMRULE_H +#define GRAPH_OPTIMIZER_RULE_GETEDGESTRANSFORMRULE_H #include "graph/optimizer/OptRule.h" @@ -43,3 +44,4 @@ class GetEdgesTransformRule final : public OptRule { } // namespace opt } // namespace nebula +#endif diff --git a/src/graph/optimizer/rule/PushFilterDownScanVerticesRule.h b/src/graph/optimizer/rule/PushFilterDownScanVerticesRule.h index 1f5cf14fc61..543938a3910 100644 --- a/src/graph/optimizer/rule/PushFilterDownScanVerticesRule.h +++ b/src/graph/optimizer/rule/PushFilterDownScanVerticesRule.h @@ -3,7 +3,8 @@ * This source code is licensed under Apache 2.0 License. */ -#pragma once +#ifndef GRAPH_OPTIMIZER_RULE_PUSHFILTERDOWNSCANVERTICESRULE_H +#define GRAPH_OPTIMIZER_RULE_PUSHFILTERDOWNSCANVERTICESRULE_H #include @@ -28,3 +29,4 @@ class PushFilterDownScanVerticesRule final : public OptRule { } // namespace opt } // namespace nebula +#endif diff --git a/src/graph/optimizer/rule/PushLimitDownGetNeighborsRule.h b/src/graph/optimizer/rule/PushLimitDownGetNeighborsRule.h index 3ee9593d3de..b613274810f 100644 --- a/src/graph/optimizer/rule/PushLimitDownGetNeighborsRule.h +++ b/src/graph/optimizer/rule/PushLimitDownGetNeighborsRule.h @@ -3,7 +3,8 @@ * This source code is licensed under Apache 2.0 License. */ -#pragma once +#ifndef GRAPH_OPTIMIZER_RULE_PUSHLIMITDOWNGETNEIGHBORSRULE_H +#define GRAPH_OPTIMIZER_RULE_PUSHLIMITDOWNGETNEIGHBORSRULE_H #include "graph/optimizer/OptRule.h" @@ -27,3 +28,4 @@ class PushLimitDownGetNeighborsRule final : public OptRule { } // namespace opt } // namespace nebula +#endif diff --git a/src/graph/optimizer/rule/PushLimitDownIndexScanRule.h b/src/graph/optimizer/rule/PushLimitDownIndexScanRule.h index 5daa5b906e2..ac16c5248a9 100644 --- a/src/graph/optimizer/rule/PushLimitDownIndexScanRule.h +++ b/src/graph/optimizer/rule/PushLimitDownIndexScanRule.h @@ -3,7 +3,8 @@ * This source code is licensed under Apache 2.0 License. */ -#pragma once +#ifndef GRAPH_OPTIMIZER_RULE_PUSHLIMITDOWNINDEXSCANRULE_H +#define GRAPH_OPTIMIZER_RULE_PUSHLIMITDOWNINDEXSCANRULE_H #include @@ -31,3 +32,4 @@ class PushLimitDownIndexScanRule final : public OptRule { } // namespace opt } // namespace nebula +#endif diff --git a/src/graph/optimizer/rule/PushLimitDownProjectRule.h b/src/graph/optimizer/rule/PushLimitDownProjectRule.h index bef89fcbd51..503e2fabce6 100644 --- a/src/graph/optimizer/rule/PushLimitDownProjectRule.h +++ b/src/graph/optimizer/rule/PushLimitDownProjectRule.h @@ -3,7 +3,8 @@ * This source code is licensed under Apache 2.0 License. */ -#pragma once +#ifndef GRAPH_OPTIMIZER_RULE_PUSHLIMITDOWNPROJECTRULE_H +#define GRAPH_OPTIMIZER_RULE_PUSHLIMITDOWNPROJECTRULE_H #include "graph/optimizer/OptRule.h" @@ -27,3 +28,4 @@ class PushLimitDownProjectRule final : public OptRule { } // namespace opt } // namespace nebula +#endif diff --git a/src/graph/optimizer/rule/PushLimitDownScanAppendVerticesRule.h b/src/graph/optimizer/rule/PushLimitDownScanAppendVerticesRule.h index 6652da49d5e..c456075fcaf 100644 --- a/src/graph/optimizer/rule/PushLimitDownScanAppendVerticesRule.h +++ b/src/graph/optimizer/rule/PushLimitDownScanAppendVerticesRule.h @@ -3,7 +3,8 @@ * This source code is licensed under Apache 2.0 License. */ -#pragma once +#ifndef GRAPH_OPTIMIZER_RULE_PUSHLIMITDOWNSCANAPPENDVERTICESRULE_H +#define GRAPH_OPTIMIZER_RULE_PUSHLIMITDOWNSCANAPPENDVERTICESRULE_H #include "graph/optimizer/OptRule.h" @@ -28,3 +29,4 @@ class PushLimitDownScanAppendVerticesRule final : public OptRule { } // namespace opt } // namespace nebula +#endif diff --git a/src/graph/optimizer/rule/PushLimitDownScanEdgesAppendVerticesRule.h b/src/graph/optimizer/rule/PushLimitDownScanEdgesAppendVerticesRule.h index 38c079bc660..dbd4672c252 100644 --- a/src/graph/optimizer/rule/PushLimitDownScanEdgesAppendVerticesRule.h +++ b/src/graph/optimizer/rule/PushLimitDownScanEdgesAppendVerticesRule.h @@ -3,7 +3,8 @@ * This source code is licensed under Apache 2.0 License. */ -#pragma once +#ifndef GRAPH_OPTIMIZER_RULE_PUSHLIMITDOWNSCANEDGESAPPENDVERTICESRULE_H +#define GRAPH_OPTIMIZER_RULE_PUSHLIMITDOWNSCANEDGESAPPENDVERTICESRULE_H #include "graph/optimizer/OptRule.h" @@ -28,3 +29,4 @@ class PushLimitDownScanEdgesAppendVerticesRule final : public OptRule { } // namespace opt } // namespace nebula +#endif diff --git a/src/graph/optimizer/rule/PushStepLimitDownGetNeighborsRule.h b/src/graph/optimizer/rule/PushStepLimitDownGetNeighborsRule.h index 657155590cb..b8a8fb5fb39 100644 --- a/src/graph/optimizer/rule/PushStepLimitDownGetNeighborsRule.h +++ b/src/graph/optimizer/rule/PushStepLimitDownGetNeighborsRule.h @@ -3,7 +3,8 @@ * This source code is licensed under Apache 2.0 License. */ -#pragma once +#ifndef GRAPH_OPTIMIZER_RULE_PUSHSTEPLIMITDOWNGETNEIGHBORSRULE_H +#define GRAPH_OPTIMIZER_RULE_PUSHSTEPLIMITDOWNGETNEIGHBORSRULE_H #include "graph/optimizer/OptRule.h" @@ -27,3 +28,4 @@ class PushStepLimitDownGetNeighborsRule final : public OptRule { } // namespace opt } // namespace nebula +#endif diff --git a/src/graph/optimizer/rule/PushStepSampleDownGetNeighborsRule.h b/src/graph/optimizer/rule/PushStepSampleDownGetNeighborsRule.h index 4ea8e8a6f96..ab105983723 100644 --- a/src/graph/optimizer/rule/PushStepSampleDownGetNeighborsRule.h +++ b/src/graph/optimizer/rule/PushStepSampleDownGetNeighborsRule.h @@ -3,7 +3,8 @@ * This source code is licensed under Apache 2.0 License. */ -#pragma once +#ifndef GRAPH_OPTIMIZER_RULE_PUSHSTEPSAMPLEDOWNGETNEIGHBORSRULE_H +#define GRAPH_OPTIMIZER_RULE_PUSHSTEPSAMPLEDOWNGETNEIGHBORSRULE_H #include "graph/optimizer/OptRule.h" @@ -27,3 +28,4 @@ class PushStepSampleDownGetNeighborsRule final : public OptRule { } // namespace opt } // namespace nebula +#endif diff --git a/src/graph/optimizer/rule/PushTopNDownIndexScanRule.h b/src/graph/optimizer/rule/PushTopNDownIndexScanRule.h index a21f459ff7b..c41e4134539 100644 --- a/src/graph/optimizer/rule/PushTopNDownIndexScanRule.h +++ b/src/graph/optimizer/rule/PushTopNDownIndexScanRule.h @@ -3,7 +3,8 @@ * This source code is licensed under Apache 2.0 License. */ -#pragma once +#ifndef GRAPH_OPTIMIZER_RULE_PUSHTOPNDOWNINDEXSCANRULE_H +#define GRAPH_OPTIMIZER_RULE_PUSHTOPNDOWNINDEXSCANRULE_H #include @@ -30,3 +31,4 @@ class PushTopNDownIndexScanRule final : public OptRule { } // namespace opt } // namespace nebula +#endif diff --git a/src/graph/optimizer/rule/PushVFilterDownScanVerticesRule.h b/src/graph/optimizer/rule/PushVFilterDownScanVerticesRule.h index 098bf752636..b6c9f3c1649 100644 --- a/src/graph/optimizer/rule/PushVFilterDownScanVerticesRule.h +++ b/src/graph/optimizer/rule/PushVFilterDownScanVerticesRule.h @@ -3,7 +3,8 @@ * This source code is licensed under Apache 2.0 License. */ -#pragma once +#ifndef GRAPH_OPTIMIZER_RULE_PUSHVFILTERDOWNSCANVERTICESRULE_H +#define GRAPH_OPTIMIZER_RULE_PUSHVFILTERDOWNSCANVERTICESRULE_H #include @@ -29,3 +30,4 @@ class PushVFilterDownScanVerticesRule final : public OptRule { } // namespace opt } // namespace nebula +#endif diff --git a/src/graph/planner/match/ArgumentFinder.h b/src/graph/planner/match/ArgumentFinder.h index 06767fbff26..381bf210254 100644 --- a/src/graph/planner/match/ArgumentFinder.h +++ b/src/graph/planner/match/ArgumentFinder.h @@ -3,7 +3,8 @@ * This source code is licensed under Apache 2.0 License. */ -#pragma once +#ifndef GRAPH_PLANNER_MATCH_ARGUMENTFINDER_H +#define GRAPH_PLANNER_MATCH_ARGUMENTFINDER_H #include "graph/planner/match/StartVidFinder.h" @@ -29,3 +30,4 @@ class ArgumentFinder final : public StartVidFinder { } // namespace graph } // namespace nebula +#endif diff --git a/src/graph/planner/match/ScanSeek.h b/src/graph/planner/match/ScanSeek.h index a87f0add441..1142723d974 100644 --- a/src/graph/planner/match/ScanSeek.h +++ b/src/graph/planner/match/ScanSeek.h @@ -3,7 +3,8 @@ * This source code is licensed under Apache 2.0 License. */ -#pragma once +#ifndef GRAPH_PLANNER_MATCH_SCANSEEK_H +#define GRAPH_PLANNER_MATCH_SCANSEEK_H #include "graph/context/ast/CypherAstContext.h" #include "graph/planner/match/StartVidFinder.h" @@ -33,3 +34,4 @@ class ScanSeek final : public StartVidFinder { }; } // namespace graph } // namespace nebula +#endif diff --git a/src/graph/planner/ngql/MaintainPlanner.h b/src/graph/planner/ngql/MaintainPlanner.h index c0ad0a9687f..cb39156d66e 100644 --- a/src/graph/planner/ngql/MaintainPlanner.h +++ b/src/graph/planner/ngql/MaintainPlanner.h @@ -2,7 +2,8 @@ * * This source code is licensed under Apache 2.0 License. */ -#pragma once +#ifndef GRAPH_PLANNER_NGQL_MAINTAINPLANNER_H +#define GRAPH_PLANNER_NGQL_MAINTAINPLANNER_H #include "common/base/Base.h" #include "graph/planner/Planner.h" @@ -59,3 +60,4 @@ class AlterEdgePlanner final : public Planner { } // namespace graph } // namespace nebula +#endif diff --git a/src/graph/stats/GraphStats.h b/src/graph/stats/GraphStats.h index 2d89e60e4c5..5fc179803be 100644 --- a/src/graph/stats/GraphStats.h +++ b/src/graph/stats/GraphStats.h @@ -3,7 +3,8 @@ * This source code is licensed under Apache 2.0 License. */ -#pragma once +#ifndef GRAPH_STATS_GRAPHSTATS_H +#define GRAPH_STATS_GRAPHSTATS_H #include "common/base/Base.h" #include "common/stats/StatsManager.h" @@ -47,3 +48,4 @@ extern stats::CounterId kNumReclaimedExpiredSessions; void initGraphStats(); } // namespace nebula +#endif diff --git a/src/kvstore/NebulaSnapshotManager.h b/src/kvstore/NebulaSnapshotManager.h index 8dca397619b..9b9e27c86b7 100644 --- a/src/kvstore/NebulaSnapshotManager.h +++ b/src/kvstore/NebulaSnapshotManager.h @@ -3,7 +3,8 @@ * This source code is licensed under Apache 2.0 License. */ -#pragma once +#ifndef KVSTORE_NEBULASNAPSHOTMANAGER_H +#define KVSTORE_NEBULASNAPSHOTMANAGER_H #include @@ -39,3 +40,4 @@ class NebulaSnapshotManager : public raftex::SnapshotManager { } // namespace kvstore } // namespace nebula +#endif diff --git a/src/kvstore/RateLimiter.h b/src/kvstore/RateLimiter.h index 727049b4bf9..3af482cdcbd 100644 --- a/src/kvstore/RateLimiter.h +++ b/src/kvstore/RateLimiter.h @@ -3,7 +3,8 @@ * This source code is licensed under Apache 2.0 License. */ -#pragma once +#ifndef KVSTORE_RATELIMITER_H +#define KVSTORE_RATELIMITER_H #include @@ -47,3 +48,4 @@ class RateLimiter { } // namespace kvstore } // namespace nebula +#endif diff --git a/src/kvstore/raftex/RaftLogIterator.h b/src/kvstore/raftex/RaftLogIterator.h index 95fc0955170..64d45c3b093 100644 --- a/src/kvstore/raftex/RaftLogIterator.h +++ b/src/kvstore/raftex/RaftLogIterator.h @@ -3,7 +3,8 @@ * This source code is licensed under Apache 2.0 License. */ -#pragma once +#ifndef KVSTORE_RAFTEX_RAFTLOGITERATOR_H +#define KVSTORE_RAFTEX_RAFTLOGITERATOR_H #include "common/base/Base.h" #include "common/utils/LogIterator.h" @@ -36,3 +37,4 @@ class RaftLogIterator final : public LogIterator { } // namespace raftex } // namespace nebula +#endif diff --git a/src/kvstore/stats/KVStats.h b/src/kvstore/stats/KVStats.h index 90da33a5f2a..3d3575cbc60 100644 --- a/src/kvstore/stats/KVStats.h +++ b/src/kvstore/stats/KVStats.h @@ -3,7 +3,8 @@ * This source code is licensed under Apache 2.0 License. */ -#pragma once +#ifndef KVSTORE_STATS_KVSTATS_H +#define KVSTORE_STATS_KVSTATS_H #include "common/base/Base.h" #include "common/stats/StatsManager.h" @@ -18,3 +19,4 @@ extern stats::CounterId kNumRaftVotes; void initKVStats(); } // namespace nebula +#endif diff --git a/src/meta/http/MetaHttpReplaceHostHandler.h b/src/meta/http/MetaHttpReplaceHostHandler.h index 0b8a793f425..ee93a3ee321 100644 --- a/src/meta/http/MetaHttpReplaceHostHandler.h +++ b/src/meta/http/MetaHttpReplaceHostHandler.h @@ -3,7 +3,8 @@ * This source code is licensed under Apache 2.0 License. */ -#pragma once +#ifndef META_HTTP_METAHTTPREPLACEHOSTHANDLER_H +#define META_HTTP_METAHTTPREPLACEHOSTHANDLER_H #include @@ -60,3 +61,4 @@ class MetaHttpReplaceHostHandler : public proxygen::RequestHandler { } // namespace meta } // namespace nebula +#endif diff --git a/src/meta/processors/BaseProcessor-inl.h b/src/meta/processors/BaseProcessor-inl.h index 2115725a6cd..69598871b95 100644 --- a/src/meta/processors/BaseProcessor-inl.h +++ b/src/meta/processors/BaseProcessor-inl.h @@ -3,7 +3,8 @@ * This source code is licensed under Apache 2.0 License. */ -#pragma once +#ifndef META_PROCESSORS_BASEPROCESSOR_INL_H +#define META_PROCESSORS_BASEPROCESSOR_INL_H #include "interface/gen-cpp2/storage_types.h" #include "meta/processors/BaseProcessor.h" @@ -632,3 +633,4 @@ nebula::cpp2::ErrorCode BaseProcessor::listenerExist(GraphSpaceID space, } // namespace meta } // namespace nebula +#endif diff --git a/src/meta/processors/admin/AgentHBProcessor.h b/src/meta/processors/admin/AgentHBProcessor.h index 9591c631b7b..16b8a7e150a 100644 --- a/src/meta/processors/admin/AgentHBProcessor.h +++ b/src/meta/processors/admin/AgentHBProcessor.h @@ -3,7 +3,8 @@ * This source code is licensed under Apache 2.0 License. */ -#pragma once +#ifndef META_PROCESSORS_ADMIN_AGENTHBPROCESSOR_H +#define META_PROCESSORS_ADMIN_AGENTHBPROCESSOR_H #include @@ -58,3 +59,4 @@ class AgentHBProcessor : public BaseProcessor { } // namespace meta } // namespace nebula +#endif diff --git a/src/meta/processors/parts/CreateSpaceAsProcessor.h b/src/meta/processors/parts/CreateSpaceAsProcessor.h index 69801ee1412..f505232db9b 100644 --- a/src/meta/processors/parts/CreateSpaceAsProcessor.h +++ b/src/meta/processors/parts/CreateSpaceAsProcessor.h @@ -2,7 +2,8 @@ * * This source code is licensed under Apache 2.0 License. */ -#pragma once +#ifndef META_PROCESSORS_PARTS_CREATESPACEASPROCESSOR_H +#define META_PROCESSORS_PARTS_CREATESPACEASPROCESSOR_H #include "meta/processors/BaseProcessor.h" @@ -41,3 +42,4 @@ class CreateSpaceAsProcessor : public BaseProcessor { } // namespace meta } // namespace nebula +#endif diff --git a/src/meta/stats/MetaStats.h b/src/meta/stats/MetaStats.h index a8a5fba750e..e93cd335755 100644 --- a/src/meta/stats/MetaStats.h +++ b/src/meta/stats/MetaStats.h @@ -3,7 +3,8 @@ * This source code is licensed under Apache 2.0 License. */ -#pragma once +#ifndef META_STATS_METASTATS_H +#define META_STATS_METASTATS_H #include "common/stats/StatsManager.h" @@ -12,3 +13,4 @@ namespace nebula { void initMetaStats(); } // namespace nebula +#endif diff --git a/src/meta/upgrade/MetaDataUpgrade.h b/src/meta/upgrade/MetaDataUpgrade.h index 39c11eb03b3..2149d65dfc2 100644 --- a/src/meta/upgrade/MetaDataUpgrade.h +++ b/src/meta/upgrade/MetaDataUpgrade.h @@ -3,8 +3,8 @@ * This source code is licensed under Apache 2.0 License. */ -#pragma once - +#ifndef META_UPGRADE_METADATAUPGRADE_H +#define META_UPGRADE_METADATAUPGRADE_H #include "common/base/Base.h" #include "common/base/Status.h" #include "common/utils/MetaKeyUtils.h" @@ -66,3 +66,4 @@ class MetaDataUpgrade final { } // namespace meta } // namespace nebula +#endif diff --git a/src/mock/LocalServer.h b/src/mock/LocalServer.h index 1edd2464914..dcff604f557 100644 --- a/src/mock/LocalServer.h +++ b/src/mock/LocalServer.h @@ -3,7 +3,8 @@ * This source code is licensed under Apache 2.0 License. */ -#pragma once +#ifndef MOCK_LOCALSERVER_H +#define MOCK_LOCALSERVER_H #include @@ -51,3 +52,4 @@ struct LocalServer { } // namespace mock } // namespace nebula +#endif diff --git a/src/parser/CMakeLists.txt b/src/parser/CMakeLists.txt index a5272dfa3ac..fc2f7d4d2b3 100644 --- a/src/parser/CMakeLists.txt +++ b/src/parser/CMakeLists.txt @@ -4,11 +4,18 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}) include_directories(${CMAKE_CURRENT_BINARY_DIR}) - -if(ENABLE_VERBOSE_BISON) - set(bison_flags "-Werror -v") +if(ENABLE_ERROR) + if(ENABLE_VERBOSE_BISON) + set(bison_flags "-Werror -v") + else() + set(bison_flags "-Werror") + endif() else() - set(bison_flags "-Werror") + if(ENABLE_VERBOSE_BISON) + set(bison_flags "-v") + else() + set(bison_flags "") + endif() endif() bison_target(Parser parser.yy ${CMAKE_CURRENT_BINARY_DIR}/GraphParser.cpp COMPILE_FLAGS ${bison_flags}) flex_target(Scanner scanner.lex ${CMAKE_CURRENT_BINARY_DIR}/GraphScanner.cpp) diff --git a/src/storage/BaseProcessor-inl.h b/src/storage/BaseProcessor-inl.h index 985a492e138..7c706f20bd8 100644 --- a/src/storage/BaseProcessor-inl.h +++ b/src/storage/BaseProcessor-inl.h @@ -3,7 +3,8 @@ * This source code is licensed under Apache 2.0 License. */ -#pragma once +#ifndef STORAGE_BASEPROCESSOR_INL_H +#define STORAGE_BASEPROCESSOR_INL_H #include "storage/BaseProcessor.h" @@ -215,3 +216,4 @@ nebula::cpp2::ErrorCode BaseProcessor::checkStatType( } // namespace storage } // namespace nebula +#endif diff --git a/src/storage/ExprVisitorBase.h b/src/storage/ExprVisitorBase.h index 516f89e4ed1..7134447eb13 100644 --- a/src/storage/ExprVisitorBase.h +++ b/src/storage/ExprVisitorBase.h @@ -3,7 +3,8 @@ * This source code is licensed under Apache 2.0 License. */ -#pragma once +#ifndef STORAGE_EXPRVISITORBASE_H +#define STORAGE_EXPRVISITORBASE_H #include "common/expression/ExprVisitor.h" namespace nebula { namespace storage { @@ -70,3 +71,4 @@ class ExprVisitorBase : public ::nebula::ExprVisitor { }; } // namespace storage } // namespace nebula +#endif diff --git a/src/storage/GraphStorageLocalServer.h b/src/storage/GraphStorageLocalServer.h index 7c8e4df0b33..7c726e9af86 100644 --- a/src/storage/GraphStorageLocalServer.h +++ b/src/storage/GraphStorageLocalServer.h @@ -3,7 +3,8 @@ * This source code is licensed under Apache 2.0 License. */ -#pragma once +#ifndef STORAGE_GRAPHSTORAGELOCALSERVER_H +#define STORAGE_GRAPHSTORAGELOCALSERVER_H #include #include @@ -65,3 +66,4 @@ class GraphStorageLocalServer final : public nebula::cpp::NonCopyable, bool serving_ = {false}; }; } // namespace nebula::storage +#endif diff --git a/src/storage/exec/IndexAggregateNode.h b/src/storage/exec/IndexAggregateNode.h index 944de7ee4a5..a3b2f2e5a82 100644 --- a/src/storage/exec/IndexAggregateNode.h +++ b/src/storage/exec/IndexAggregateNode.h @@ -2,7 +2,8 @@ * * This source code is licensed under Apache 2.0 License. */ -#pragma once +#ifndef STORAGE_EXEC_INDEXAGGREGATENODE_H +#define STORAGE_EXEC_INDEXAGGREGATENODE_H #include "storage/exec/IndexNode.h" namespace nebula { @@ -47,3 +48,4 @@ class IndexAggregateNode : public IndexNode { } // namespace storage } // namespace nebula +#endif diff --git a/src/storage/exec/IndexDedupNode.h b/src/storage/exec/IndexDedupNode.h index dfc1f2dbd47..025f34f12e4 100644 --- a/src/storage/exec/IndexDedupNode.h +++ b/src/storage/exec/IndexDedupNode.h @@ -2,7 +2,8 @@ * * This source code is licensed under Apache 2.0 License. */ -#pragma once +#ifndef STORAGE_EXEC_INDEXDEDUPNODE_H +#define STORAGE_EXEC_INDEXDEDUPNODE_H #include "common/datatypes/DataSet.h" #include "folly/container/F14Set.h" #include "storage/exec/IndexNode.h" @@ -79,3 +80,4 @@ inline bool IndexDedupNode::dedup(const Row& row) { } // namespace storage } // namespace nebula +#endif diff --git a/src/storage/exec/IndexEdgeScanNode.h b/src/storage/exec/IndexEdgeScanNode.h index d21ef95faa5..081708ea44f 100644 --- a/src/storage/exec/IndexEdgeScanNode.h +++ b/src/storage/exec/IndexEdgeScanNode.h @@ -2,7 +2,8 @@ * * This source code is licensed under Apache 2.0 License. */ -#pragma once +#ifndef STORAGE_EXEC_INDEXEDGESCANNODE_H +#define STORAGE_EXEC_INDEXEDGESCANNODE_H #include "common/base/Base.h" #include "common/utils/NebulaKeyUtils.h" #include "storage/exec/IndexScanNode.h" @@ -47,3 +48,4 @@ class IndexEdgeScanNode : public IndexScanNode { }; } // namespace storage } // namespace nebula +#endif diff --git a/src/storage/exec/IndexExprContext.h b/src/storage/exec/IndexExprContext.h index a0cf4795062..fc359cc38f1 100644 --- a/src/storage/exec/IndexExprContext.h +++ b/src/storage/exec/IndexExprContext.h @@ -2,7 +2,8 @@ * * This source code is licensed under Apache 2.0 License. */ -#pragma once +#ifndef STORAGE_EXEC_INDEXEXPRCONTEXT_H +#define STORAGE_EXEC_INDEXEXPRCONTEXT_H #include "common/expression/Expression.h" #include "storage/exec/IndexNode.h" @@ -87,3 +88,4 @@ class IndexExprContext : public ExpressionContext { } // namespace storage } // namespace nebula +#endif diff --git a/src/storage/exec/IndexLimitNode.h b/src/storage/exec/IndexLimitNode.h index 576d77123bd..e6c2f9e02b2 100644 --- a/src/storage/exec/IndexLimitNode.h +++ b/src/storage/exec/IndexLimitNode.h @@ -2,7 +2,8 @@ * * This source code is licensed under Apache 2.0 License. */ -#pragma once +#ifndef STORAGE_EXEC_INDEXLIMITNODE_H +#define STORAGE_EXEC_INDEXLIMITNODE_H #include "folly/Likely.h" #include "storage/exec/IndexNode.h" namespace nebula { @@ -26,3 +27,4 @@ class IndexLimitNode : public IndexNode { } // namespace storage } // namespace nebula +#endif diff --git a/src/storage/exec/IndexNode.h b/src/storage/exec/IndexNode.h index 5344e64278f..9f7ec609c41 100644 --- a/src/storage/exec/IndexNode.h +++ b/src/storage/exec/IndexNode.h @@ -2,7 +2,8 @@ * * This source code is licensed under Apache 2.0 License. */ -#pragma once +#ifndef STORAGE_EXEC_INDEXNODE_H +#define STORAGE_EXEC_INDEXNODE_H #include "common/base/ErrorOr.h" #include "common/datatypes/DataSet.h" #include "common/time/Duration.h" @@ -211,3 +212,4 @@ inline const time::Duration& IndexNode::duration() { } // namespace storage } // namespace nebula +#endif diff --git a/src/storage/exec/IndexProjectionNode.h b/src/storage/exec/IndexProjectionNode.h index 736971620e9..633fd46283f 100644 --- a/src/storage/exec/IndexProjectionNode.h +++ b/src/storage/exec/IndexProjectionNode.h @@ -2,7 +2,8 @@ * * This source code is licensed under Apache 2.0 License. */ -#pragma once +#ifndef STORAGE_EXEC_INDEXPROJECTIONNODE_H +#define STORAGE_EXEC_INDEXPROJECTIONNODE_H #include "folly/Likely.h" #include "storage/exec/IndexNode.h" @@ -44,3 +45,4 @@ class IndexProjectionNode : public IndexNode { }; } // namespace storage } // namespace nebula +#endif diff --git a/src/storage/exec/IndexScanNode.h b/src/storage/exec/IndexScanNode.h index f7dc2e13595..00cb9f12057 100644 --- a/src/storage/exec/IndexScanNode.h +++ b/src/storage/exec/IndexScanNode.h @@ -2,7 +2,8 @@ * * This source code is licensed under Apache 2.0 License. */ -#pragma once +#ifndef STORAGE_EXEC_INDEXSCANNODE_H +#define STORAGE_EXEC_INDEXSCANNODE_H #include #include @@ -444,3 +445,4 @@ inline QualifiedStrategy::Result QualifiedStrategy::operator()(const folly::Stri } // namespace storage } // namespace nebula +#endif diff --git a/src/storage/exec/IndexSelectionNode.h b/src/storage/exec/IndexSelectionNode.h index 095890ba751..9cb73711a3c 100644 --- a/src/storage/exec/IndexSelectionNode.h +++ b/src/storage/exec/IndexSelectionNode.h @@ -2,7 +2,8 @@ * * This source code is licensed under Apache 2.0 License. */ -#pragma once +#ifndef STORAGE_EXEC_INDEXSELECTIONNODE_H +#define STORAGE_EXEC_INDEXSELECTIONNODE_H #include "common/context/ExpressionContext.h" #include "common/expression/Expression.h" @@ -103,3 +104,4 @@ class SelectionExprVisitor : public ExprVisitorBase { } // namespace storage } // namespace nebula +#endif diff --git a/src/storage/exec/IndexTopNNode.h b/src/storage/exec/IndexTopNNode.h index 76180995ef1..a7f095cefc6 100644 --- a/src/storage/exec/IndexTopNNode.h +++ b/src/storage/exec/IndexTopNNode.h @@ -2,7 +2,8 @@ * * This source code is licensed under Apache 2.0 License. */ -#pragma once +#ifndef STORAGE_EXEC_INDEXTOPNNODE_H +#define STORAGE_EXEC_INDEXTOPNNODE_H #include "folly/Likely.h" #include "storage/exec/IndexLimitNode.h" namespace nebula { @@ -96,3 +97,4 @@ class IndexTopNNode : public IndexLimitNode { } // namespace storage } // namespace nebula +#endif diff --git a/src/storage/exec/IndexVertexScanNode.h b/src/storage/exec/IndexVertexScanNode.h index 116a0e70eae..7c97f9b489d 100644 --- a/src/storage/exec/IndexVertexScanNode.h +++ b/src/storage/exec/IndexVertexScanNode.h @@ -2,7 +2,8 @@ * * This source code is licensed under Apache 2.0 License. */ -#pragma once +#ifndef STORAGE_EXEC_INDEXVERTEXSCANNODE_H +#define STORAGE_EXEC_INDEXVERTEXSCANNODE_H #include @@ -57,3 +58,4 @@ class IndexVertexScanNode final : public IndexScanNode { }; } // namespace storage } // namespace nebula +#endif diff --git a/src/storage/exec/MultiTagNode.h b/src/storage/exec/MultiTagNode.h index ba2ba3ade92..46e92adbcb6 100644 --- a/src/storage/exec/MultiTagNode.h +++ b/src/storage/exec/MultiTagNode.h @@ -2,7 +2,8 @@ * * This source code is licensed under Apache 2.0 License. */ -#pragma once +#ifndef STORAGE_EXEC_MULTITAGNODE_H +#define STORAGE_EXEC_MULTITAGNODE_H #include "common/base/Base.h" #include "storage/context/StorageExpressionContext.h" @@ -116,3 +117,4 @@ class MultiTagNode : public IterateNode { } // namespace storage } // namespace nebula +#endif diff --git a/src/storage/exec/ScanNode.h b/src/storage/exec/ScanNode.h index 61e6c94d30d..7420b50c9d8 100644 --- a/src/storage/exec/ScanNode.h +++ b/src/storage/exec/ScanNode.h @@ -3,7 +3,8 @@ * This source code is licensed under Apache 2.0 License. */ -#pragma once +#ifndef STORAGE_EXEC_SCANNODE_H +#define STORAGE_EXEC_SCANNODE_H #include "common/base/Base.h" #include "storage/exec/GetPropNode.h" @@ -318,3 +319,4 @@ class ScanEdgePropNode : public QueryNode { } // namespace storage } // namespace nebula +#endif diff --git a/src/storage/http/StorageHttpPropertyHandler.h b/src/storage/http/StorageHttpPropertyHandler.h index a865b5165b5..33cea28e48d 100644 --- a/src/storage/http/StorageHttpPropertyHandler.h +++ b/src/storage/http/StorageHttpPropertyHandler.h @@ -3,7 +3,8 @@ * This source code is licensed under Apache 2.0 License. */ -#pragma once +#ifndef STORAGE_HTTP_STORAGEHTTPPROPERTYHANDLER_H +#define STORAGE_HTTP_STORAGEHTTPPROPERTYHANDLER_H #include @@ -42,3 +43,4 @@ class StorageHttpPropertyHandler : public proxygen::RequestHandler { } // namespace storage } // namespace nebula +#endif diff --git a/src/storage/index/LookupProcessor.h b/src/storage/index/LookupProcessor.h index 05012f5f560..94f3a7dc8a2 100644 --- a/src/storage/index/LookupProcessor.h +++ b/src/storage/index/LookupProcessor.h @@ -2,7 +2,8 @@ * * This source code is licensed under Apache 2.0 License. */ -#pragma once +#ifndef STORAGE_INDEX_LOOKUPPROCESSOR_H +#define STORAGE_INDEX_LOOKUPPROCESSOR_H #include "common/base/Base.h" #include "common/base/ErrorOr.h" #include "interface/gen-cpp2/storage_types.h" @@ -53,3 +54,4 @@ class LookupProcessor : public BaseProcessor { }; } // namespace storage } // namespace nebula +#endif diff --git a/src/storage/stats/StorageStats.h b/src/storage/stats/StorageStats.h index 11bf1a76315..8dd779f24c2 100644 --- a/src/storage/stats/StorageStats.h +++ b/src/storage/stats/StorageStats.h @@ -3,7 +3,8 @@ * This source code is licensed under Apache 2.0 License. */ -#pragma once +#ifndef STORAGE_STATS_STORAGESTATS_H +#define STORAGE_STATS_STORAGESTATS_H #include "common/stats/StatsManager.h" @@ -18,3 +19,4 @@ extern stats::CounterId kNumVerticesDeleted; void initStorageStats(); } // namespace nebula +#endif diff --git a/src/storage/test/ChainTestUtils.h b/src/storage/test/ChainTestUtils.h index 05bc100debd..13bd708ca0e 100644 --- a/src/storage/test/ChainTestUtils.h +++ b/src/storage/test/ChainTestUtils.h @@ -3,7 +3,8 @@ * This source code is licensed under Apache 2.0 License. */ -#pragma once +#ifndef STORAGE_TEST_CHAINTESTUTILS_H +#define STORAGE_TEST_CHAINTESTUTILS_H #include "storage/CommonUtils.h" #include "storage/transaction/ChainAddEdgesLocalProcessor.h" @@ -621,3 +622,4 @@ struct ChainUpdateEdgeTestHelper { } // namespace storage } // namespace nebula +#endif diff --git a/src/storage/test/IndexTestUtil.h b/src/storage/test/IndexTestUtil.h index 09c5747dfa3..8af81231ff6 100644 --- a/src/storage/test/IndexTestUtil.h +++ b/src/storage/test/IndexTestUtil.h @@ -3,7 +3,8 @@ * This source code is licensed under Apache 2.0 License. */ -#pragma once +#ifndef STORAGE_TEST_INDEXTESTUTIL_H +#define STORAGE_TEST_INDEXTESTUTIL_H #include #include #include @@ -655,3 +656,4 @@ IndexParser operator"" _index(const char* str, std::size_t) { } // namespace storage } // namespace nebula +#endif diff --git a/src/storage/test/TossTestExecutor.h b/src/storage/test/TossTestExecutor.h index bda7b9b9219..be451ba9839 100644 --- a/src/storage/test/TossTestExecutor.h +++ b/src/storage/test/TossTestExecutor.h @@ -3,7 +3,8 @@ * This source code is licensed under Apache 2.0 License. */ -#pragma once +#ifndef STORAGE_TEST_TOSSTESTEXECUTOR_H +#define STORAGE_TEST_TOSSTESTEXECUTOR_H #include "TossEnvironment.h" @@ -387,3 +388,4 @@ struct UpdateExecutor { } // namespace storage } // namespace nebula +#endif diff --git a/src/storage/test/TossTestUtils.h b/src/storage/test/TossTestUtils.h index 006cd46753f..68e84c1779f 100644 --- a/src/storage/test/TossTestUtils.h +++ b/src/storage/test/TossTestUtils.h @@ -3,7 +3,8 @@ * This source code is licensed under Apache 2.0 License. */ -#pragma once +#ifndef STORAGE_TEST_TOSSTESTUTILS_H +#define STORAGE_TEST_TOSSTESTUTILS_H #include #include @@ -243,3 +244,4 @@ struct TossTestUtils { } // namespace storage } // namespace nebula +#endif diff --git a/src/storage/transaction/ChainAddEdgesGroupProcessor.h b/src/storage/transaction/ChainAddEdgesGroupProcessor.h index 83fdeb4c55e..c36f6d96c10 100644 --- a/src/storage/transaction/ChainAddEdgesGroupProcessor.h +++ b/src/storage/transaction/ChainAddEdgesGroupProcessor.h @@ -3,7 +3,8 @@ * This source code is licensed under Apache 2.0 License. */ -#pragma once +#ifndef STORAGE_TRANSACTION_CHAINADDEDGESGROUPPROCESSOR_H +#define STORAGE_TRANSACTION_CHAINADDEDGESGROUPPROCESSOR_H #include "storage/BaseProcessor.h" #include "storage/transaction/ChainBaseProcessor.h" @@ -31,3 +32,4 @@ class ChainAddEdgesGroupProcessor : public BaseProcessor { } // namespace storage } // namespace nebula +#endif diff --git a/src/storage/transaction/ChainAddEdgesLocalProcessor.h b/src/storage/transaction/ChainAddEdgesLocalProcessor.h index d9f397dc91d..e2e64d1d216 100644 --- a/src/storage/transaction/ChainAddEdgesLocalProcessor.h +++ b/src/storage/transaction/ChainAddEdgesLocalProcessor.h @@ -3,7 +3,8 @@ * This source code is licensed under Apache 2.0 License. */ -#pragma once +#ifndef STORAGE_TRANSACTION_CHAINADDEDGESPROCESSORLOCAL_H +#define STORAGE_TRANSACTION_CHAINADDEDGESPROCESSORLOCAL_H #include "interface/gen-cpp2/storage_types.h" #include "kvstore/LogEncoder.h" @@ -164,3 +165,4 @@ class ChainAddEdgesLocalProcessor : public BaseProcessor, } // namespace storage } // namespace nebula +#endif diff --git a/src/storage/transaction/ChainAddEdgesRemoteProcessor.h b/src/storage/transaction/ChainAddEdgesRemoteProcessor.h index 56c8c2bf6fb..a047cdf3dc0 100644 --- a/src/storage/transaction/ChainAddEdgesRemoteProcessor.h +++ b/src/storage/transaction/ChainAddEdgesRemoteProcessor.h @@ -3,7 +3,8 @@ * This source code is licensed under Apache 2.0 License. */ -#pragma once +#ifndef STORAGE_TRANSACTION_CHAINADDEDGESPROCESSORREMOTE_H +#define STORAGE_TRANSACTION_CHAINADDEDGESPROCESSORREMOTE_H #include "storage/BaseProcessor.h" #include "storage/transaction/ChainBaseProcessor.h" @@ -32,3 +33,4 @@ class ChainAddEdgesRemoteProcessor : public BaseProcessor { } // namespace storage } // namespace nebula +#endif diff --git a/src/storage/transaction/ChainBaseProcessor.h b/src/storage/transaction/ChainBaseProcessor.h index e9f2e3e128c..e0902556eb5 100644 --- a/src/storage/transaction/ChainBaseProcessor.h +++ b/src/storage/transaction/ChainBaseProcessor.h @@ -3,7 +3,8 @@ * This source code is licensed under Apache 2.0 License. */ -#pragma once +#ifndef STORAGE_TRANSACTION_CHAINBASEPROCESSOR_H +#define STORAGE_TRANSACTION_CHAINBASEPROCESSOR_H #include "common/utils/MemoryLockWrapper.h" #include "storage/CommonUtils.h" @@ -53,3 +54,4 @@ class ChainBaseProcessor { } // namespace storage } // namespace nebula +#endif diff --git a/src/storage/transaction/ChainDeleteEdgesGroupProcessor.h b/src/storage/transaction/ChainDeleteEdgesGroupProcessor.h index ea195b700fc..6b12cc454f7 100644 --- a/src/storage/transaction/ChainDeleteEdgesGroupProcessor.h +++ b/src/storage/transaction/ChainDeleteEdgesGroupProcessor.h @@ -3,7 +3,8 @@ * This source code is licensed under Apache 2.0 License. */ -#pragma once +#ifndef STORAGE_TRANSACTION_CHAINDELETEEDGESGROUPPROCESSOR_H +#define STORAGE_TRANSACTION_CHAINDELETEEDGESGROUPPROCESSOR_H #include "storage/BaseProcessor.h" #include "storage/transaction/ChainBaseProcessor.h" @@ -32,3 +33,4 @@ class ChainDeleteEdgesGroupProcessor : public BaseProcessor } // namespace storage } // namespace nebula +#endif diff --git a/src/storage/transaction/ChainDeleteEdgesLocalProcessor.h b/src/storage/transaction/ChainDeleteEdgesLocalProcessor.h index 5a356b36e0d..06555a64686 100644 --- a/src/storage/transaction/ChainDeleteEdgesLocalProcessor.h +++ b/src/storage/transaction/ChainDeleteEdgesLocalProcessor.h @@ -3,7 +3,8 @@ * This source code is licensed under Apache 2.0 License. */ -#pragma once +#ifndef STORAGE_TRANSACTION_CHAINDELETEEDGESLOCALPROCESSOR_H +#define STORAGE_TRANSACTION_CHAINDELETEEDGESLOCALPROCESSOR_H #include "interface/gen-cpp2/common_types.h" #include "interface/gen-cpp2/storage_types.h" @@ -115,3 +116,4 @@ class ChainDeleteEdgesLocalProcessor : public BaseProcessor, } // namespace storage } // namespace nebula +#endif diff --git a/src/storage/transaction/ChainDeleteEdgesRemoteProcessor.h b/src/storage/transaction/ChainDeleteEdgesRemoteProcessor.h index 1c142b6ac59..b48b057b94b 100644 --- a/src/storage/transaction/ChainDeleteEdgesRemoteProcessor.h +++ b/src/storage/transaction/ChainDeleteEdgesRemoteProcessor.h @@ -3,7 +3,8 @@ * This source code is licensed under Apache 2.0 License. */ -#pragma once +#ifndef STORAGE_TRANSACTION_CHAINDELETEEDGESREMOTEPROCESSOR_H +#define STORAGE_TRANSACTION_CHAINDELETEEDGESREMOTEPROCESSOR_H #include "storage/BaseProcessor.h" #include "storage/transaction/ChainBaseProcessor.h" @@ -33,3 +34,4 @@ class ChainDeleteEdgesRemoteProcessor : public BaseProcessor } // namespace storage } // namespace nebula +#endif diff --git a/src/storage/transaction/ChainDeleteEdgesResumeProcessor.h b/src/storage/transaction/ChainDeleteEdgesResumeProcessor.h index d7ff4060260..6be472b9d08 100644 --- a/src/storage/transaction/ChainDeleteEdgesResumeProcessor.h +++ b/src/storage/transaction/ChainDeleteEdgesResumeProcessor.h @@ -3,7 +3,8 @@ * This source code is licensed under Apache 2.0 License. */ -#pragma once +#ifndef STORAGE_TRANSACTION_CHAINDELETEEDGESRESUMEPROCESSOR_H +#define STORAGE_TRANSACTION_CHAINDELETEEDGESRESUMEPROCESSOR_H #include "storage/transaction/ChainDeleteEdgesLocalProcessor.h" @@ -30,3 +31,4 @@ class ChainDeleteEdgesResumeProcessor : public ChainDeleteEdgesLocalProcessor { } // namespace storage } // namespace nebula +#endif diff --git a/src/storage/transaction/ChainDeleteEdgesResumeRemoteProcessor.h b/src/storage/transaction/ChainDeleteEdgesResumeRemoteProcessor.h index 3ae19e2dd5c..17cb357de25 100644 --- a/src/storage/transaction/ChainDeleteEdgesResumeRemoteProcessor.h +++ b/src/storage/transaction/ChainDeleteEdgesResumeRemoteProcessor.h @@ -3,7 +3,8 @@ * This source code is licensed under Apache 2.0 License. */ -#pragma once +#ifndef STORAGE_TRANSACTION_CHAINDELETEEDGESRESUMEREMOTEPROCESSOR_H +#define STORAGE_TRANSACTION_CHAINDELETEEDGESRESUMEREMOTEPROCESSOR_H #include "storage/transaction/ChainDeleteEdgesLocalProcessor.h" @@ -32,3 +33,4 @@ class ChainDeleteEdgesResumeRemoteProcessor : public ChainDeleteEdgesLocalProces } // namespace storage } // namespace nebula +#endif diff --git a/src/storage/transaction/ChainProcessorFactory.h b/src/storage/transaction/ChainProcessorFactory.h index 05a062c0fda..37f0d64df1e 100644 --- a/src/storage/transaction/ChainProcessorFactory.h +++ b/src/storage/transaction/ChainProcessorFactory.h @@ -3,7 +3,8 @@ * This source code is licensed under Apache 2.0 License. */ -#pragma once +#ifndef STORAGE_TRANSACTION_CHAINPROCESSORFACTORY_H +#define STORAGE_TRANSACTION_CHAINPROCESSORFACTORY_H #include "storage/CommonUtils.h" #include "storage/transaction/ChainBaseProcessor.h" @@ -27,3 +28,4 @@ class ChainProcessorFactory { } // namespace storage } // namespace nebula +#endif diff --git a/src/storage/transaction/ChainResumeAddDoublePrimeProcessor.h b/src/storage/transaction/ChainResumeAddDoublePrimeProcessor.h index 4eb918e2c99..85d6907fdf1 100644 --- a/src/storage/transaction/ChainResumeAddDoublePrimeProcessor.h +++ b/src/storage/transaction/ChainResumeAddDoublePrimeProcessor.h @@ -3,7 +3,8 @@ * This source code is licensed under Apache 2.0 License. */ -#pragma once +#ifndef STORAGE_TRANSACTION_CHAINRESUMEADDDOUBLEPRIMEPROCESSOR_H +#define STORAGE_TRANSACTION_CHAINRESUMEADDDOUBLEPRIMEPROCESSOR_H #include "storage/transaction/ChainAddEdgesLocalProcessor.h" @@ -32,3 +33,4 @@ class ChainResumeAddDoublePrimeProcessor : public ChainAddEdgesLocalProcessor { } // namespace storage } // namespace nebula +#endif diff --git a/src/storage/transaction/ChainResumeAddPrimeProcessor.h b/src/storage/transaction/ChainResumeAddPrimeProcessor.h index 4f6251c3fb1..a78c4b6e191 100644 --- a/src/storage/transaction/ChainResumeAddPrimeProcessor.h +++ b/src/storage/transaction/ChainResumeAddPrimeProcessor.h @@ -3,7 +3,8 @@ * This source code is licensed under Apache 2.0 License. */ -#pragma once +#ifndef STORAGE_TRANSACTION_CHAINRESUMEADDPRIMEPROCESSOR_H +#define STORAGE_TRANSACTION_CHAINRESUMEADDPRIMEPROCESSOR_H #include "storage/transaction/ChainAddEdgesLocalProcessor.h" @@ -30,3 +31,4 @@ class ChainResumeAddPrimeProcessor : public ChainAddEdgesLocalProcessor { } // namespace storage } // namespace nebula +#endif diff --git a/src/storage/transaction/ChainResumeUpdateDoublePrimeProcessor.h b/src/storage/transaction/ChainResumeUpdateDoublePrimeProcessor.h index df4a6ba8bdf..b26bcb96ca9 100644 --- a/src/storage/transaction/ChainResumeUpdateDoublePrimeProcessor.h +++ b/src/storage/transaction/ChainResumeUpdateDoublePrimeProcessor.h @@ -3,7 +3,8 @@ * This source code is licensed under Apache 2.0 License. */ -#pragma once +#ifndef STORAGE_TRANSACTION_CHAINRESUMEUPDATEDOUBLEPRIMEPROCESSOR_H +#define STORAGE_TRANSACTION_CHAINRESUMEUPDATEDOUBLEPRIMEPROCESSOR_H #include "storage/transaction/ChainUpdateEdgeLocalProcessor.h" @@ -39,3 +40,4 @@ class ChainResumeUpdateDoublePrimeProcessor : public ChainUpdateEdgeLocalProcess } // namespace storage } // namespace nebula +#endif diff --git a/src/storage/transaction/ChainResumeUpdatePrimeProcessor.h b/src/storage/transaction/ChainResumeUpdatePrimeProcessor.h index bf13906f5bc..0c038440e1c 100644 --- a/src/storage/transaction/ChainResumeUpdatePrimeProcessor.h +++ b/src/storage/transaction/ChainResumeUpdatePrimeProcessor.h @@ -3,7 +3,8 @@ * This source code is licensed under Apache 2.0 License. */ -#pragma once +#ifndef STORAGE_TRANSACTION_CHAINRESUMEUPDATEPRIMEPROCESSOR_H +#define STORAGE_TRANSACTION_CHAINRESUMEUPDATEPRIMEPROCESSOR_H #include "storage/transaction/ChainUpdateEdgeLocalProcessor.h" @@ -37,3 +38,4 @@ class ChainResumeUpdatePrimeProcessor : public ChainUpdateEdgeLocalProcessor { } // namespace storage } // namespace nebula +#endif diff --git a/src/storage/transaction/ChainUpdateEdgeLocalProcessor.h b/src/storage/transaction/ChainUpdateEdgeLocalProcessor.h index d4b1a9af0f9..4f4f61a616a 100644 --- a/src/storage/transaction/ChainUpdateEdgeLocalProcessor.h +++ b/src/storage/transaction/ChainUpdateEdgeLocalProcessor.h @@ -3,7 +3,8 @@ * This source code is licensed under Apache 2.0 License. */ -#pragma once +#ifndef STORAGE_TRANSACTION_CHAINUPDATEEDGEPROCESSORLOCAL_H +#define STORAGE_TRANSACTION_CHAINUPDATEEDGEPROCESSORLOCAL_H #include @@ -93,3 +94,4 @@ class ChainUpdateEdgeLocalProcessor } // namespace storage } // namespace nebula +#endif diff --git a/src/storage/transaction/ChainUpdateEdgeRemoteProcessor.h b/src/storage/transaction/ChainUpdateEdgeRemoteProcessor.h index b3034fc9d3d..b7b8794a94b 100644 --- a/src/storage/transaction/ChainUpdateEdgeRemoteProcessor.h +++ b/src/storage/transaction/ChainUpdateEdgeRemoteProcessor.h @@ -3,7 +3,8 @@ * This source code is licensed under Apache 2.0 License. */ -#pragma once +#ifndef STORAGE_TRANSACTION_CHAINUPDATEEDGEPROCESSORREMOTE_H +#define STORAGE_TRANSACTION_CHAINUPDATEEDGEPROCESSORREMOTE_H #include "common/utils/MemoryLockWrapper.h" #include "storage/BaseProcessor.h" @@ -34,3 +35,4 @@ class ChainUpdateEdgeRemoteProcessor : public BaseProcessor @@ -39,3 +40,4 @@ struct HookFuncPara { } // namespace storage } // namespace nebula +#endif diff --git a/src/storage/transaction/ConsistUtil.h b/src/storage/transaction/ConsistUtil.h index 48f9aae1fb6..e4e64c701a1 100644 --- a/src/storage/transaction/ConsistUtil.h +++ b/src/storage/transaction/ConsistUtil.h @@ -3,7 +3,8 @@ * This source code is licensed under Apache 2.0 License. */ -#pragma once +#ifndef STORAGE_TRANSACTION_CONSISTUTIL_H +#define STORAGE_TRANSACTION_CONSISTUTIL_H #include "common/time/WallClock.h" #include "common/utils/MemoryLockWrapper.h" @@ -103,3 +104,4 @@ struct DeleteEdgesRequestHelper final { } // namespace storage } // namespace nebula +#endif diff --git a/src/storage/transaction/TransactionManager.h b/src/storage/transaction/TransactionManager.h index f94156b92e6..bfef71ae89e 100644 --- a/src/storage/transaction/TransactionManager.h +++ b/src/storage/transaction/TransactionManager.h @@ -3,7 +3,8 @@ * This source code is licensed under Apache 2.0 License. */ -#pragma once +#ifndef STORAGE_TRANSACTION_TRANSACTIONMANAGER_H +#define STORAGE_TRANSACTION_TRANSACTIONMANAGER_H #include #include @@ -149,3 +150,4 @@ class TransactionManager { } // namespace storage } // namespace nebula +#endif diff --git a/src/tools/db-upgrade/NebulaKeyUtilsV3.h b/src/tools/db-upgrade/NebulaKeyUtilsV3.h index 55862dcd726..b486690067f 100644 --- a/src/tools/db-upgrade/NebulaKeyUtilsV3.h +++ b/src/tools/db-upgrade/NebulaKeyUtilsV3.h @@ -2,7 +2,8 @@ * * This source code is licensed under Apache 2.0 License. */ -#pragma once +#ifndef TOOLS_DB_UPGRADE_NEBULAKEYUTILSV3_H +#define TOOLS_DB_UPGRADE_NEBULAKEYUTILSV3_H #include "common/utils/Types.h" namespace nebula { class NebulaKeyUtilsV3 { @@ -16,3 +17,4 @@ class NebulaKeyUtilsV3 { }; } // namespace nebula +#endif