8000 Improvements for Pregel memory-mapped files (#14636) · arangodb/arangodb@93e5b32 · GitHub
[go: up one dir, main page]

Skip to content

Commit 93e5b32

Browse files
authored
Improvements for Pregel memory-mapped files (#14636)
1 parent 967afe0 commit 93e5b32

File tree

8 files changed

+236
-171
lines changed

8 files changed

+236
-171
lines changed

CHANGELOG

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
devel
22
-----
33

4+
* When creating Pregel memory-mapped files, create them with O_TMPFILE
5+
attribute on Linux so that files are guaranteed to vanish even if a
6+
process dies.
7+
48
* Fixed: getResponsibleShard call on disjoint Smart Graphs
59
if you asked for the responsible shard on a disjoint edge collection
610
where the _from and _to differ (invalid), the server would respond with

arangod/Pregel/Algos/PageRank.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,8 @@ struct PRMasterContext : public MasterContext {
116116
}
117117

118118
void preApplication() override {
119-
LOG_TOPIC("e0598", DEBUG, Logger::PREGEL) << "Using threshold " << _threshold;
120-
};
119+
LOG_TOPIC("e0598", DEBUG, Logger::PREGEL) << "Using threshold " << _threshold << " for pagerank";
120+
}
121121

122122
bool postGlobalSuperstep() override {
123123
float const* diff = getAggregatedValue<float>(kConvergence);

arangod/Pregel/GraphStore.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -293,12 +293,15 @@ void moveAppend(std::vector<X>& src, std::vector<X>& dst) {
293293
template <typename M>
294294
std::unique_ptr<TypedBuffer<M>> createBuffer(WorkerConfig const& config, size_t cap) {
295295
if (config.useMemoryMaps()) {
296-
auto ptr = std::make_unique<MappedFileBuffer<M>>(cap);
296+
// prefix used for logging in TypedBuffer.h
297+
std::string logPrefix = "[job " + std::to_string(config.executionNumber()) + "] ";
298+
299+
auto ptr = std::make_unique<MappedFileBuffer<M>>(cap, logPrefix);
297300
ptr->sequentialAccess();
298301
return ptr;
299-
} else {
300-
return std::make_unique<VectorTypedBuffer<M>>(cap);
301302
}
303+
304+
return std::make_unique<VectorTypedBuffer<M>>(cap);
302305
}
303306
} // namespace
304307

0 commit comments

Comments
 (0)
0