8000 fix logId check by jsteemann · Pull Request #14793 · arangodb/arangodb · GitHub
[go: up one dir, main page]

Skip to content

fix logId check #14793

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 17, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion arangod/Pregel/Conductor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ using namespace arangodb;
using namespace arangodb::pregel;
using namespace arangodb::basics;

#define LOG_PREGEL(id, level) LOG_TOPIC(id, level, Logger::PREGEL) << "[job " << _executionNumber << "] "
#define LOG_PREGEL(logId, level) \
LOG_TOPIC(logId, level, Logger::PREGEL) \
<< "[job " << _executionNumber << "] "

const char* arangodb::pregel::ExecutionStateNames[8] = {
"none", "running", "storing", "done",
Expand Down
6 changes: 4 additions & 2 deletions arangod/Pregel/GraphStore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@
using namespace arangodb;
using namespace arangodb::pregel;

#define LOG_PREGEL(id, level) LOG_TOPIC(id, level, Logger::PREGEL) << "[job " << _executionNumber << "] "
#define LOG_PREGEL(logId, level) \
LOG_TOPIC(logId, level, Logger::PREGEL) \
<< "[job " << _executionNumber << "] "

namespace {
static constexpr size_t minStringChunkSize = 16 * 1024 * sizeof(char);
Expand Down Expand Up @@ -302,7 +304,7 @@ std::unique_ptr<TypedBuffer<M>> createBuffer(WorkerConfig const& config, size_t
template <typename V, typename E>
void GraphStore<V, E>::loadVertices(ShardID const& vertexShard,
std::vector<ShardID> const& edgeShards) {
LOG_PREGEL("24837", DEBUG)
LOG_PREGEL("24838", DEBUG)
<< "Loading from vertex shard " << vertexShard << ", edge shards: " << edgeShards;

transaction::Options trxOpts;
Expand Down
4 changes: 3 additions & 1 deletion arangod/Pregel/Worker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ using namespace arangodb;
using namespace arangodb::basics;
using namespace arangodb::pregel;

#define LOG_PREGEL(id, level) LOG_TOPIC(id, level, Logger::PREGEL) << "[job " << _config.executionNumber() << "] "
#define LOG_PREGEL(logId, level) \
LOG_TOPIC(logId, level, Logger::PREGEL) \
<< "[job " << _config.executionNumber() << "] "

#define MY_READ_LOCKER(obj, lock) \
ReadLocker<ReadWriteLock> obj(&lock, arangodb::basics::LockerType::BLOCKING, \
Expand Down
2 changes: 1 addition & 1 deletion utils/checkLogIds.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def is_good(status):
return status in (Status.OK, Status.OK_REPLACED)

import re
g_log_topic_pattern = re.compile(r'(?P<macro>LOG_(TOPIC(_IF)?|TRX|CTX(_IF)?|QUERY))\((?P<param>[^),]*),(?P<rest>.*)')
g_log_topic_pattern = re.compile(r'(?P<macro>LOG_(TOPIC(_IF)?|TRX|CTX(_IF)?|QUERY|PREGEL))\((?P<param>[^),]*),(?P<rest>.*)')

import hashlib
g_hash_algorithm = hashlib.md5()
Expand Down
0