Skip to content

Commit 277b8d1

Browse files
author
Alan Wright
committed
Fix segfault when recording directory listing (Marcin Junczys-Dowmunt).
1 parent 3b76d7c commit 277b8d1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/core/index/SegmentInfos.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -421,10 +421,10 @@ namespace Lucene
421421
// as there is no stale caching on the directory contents (NOTE: NFS clients often have such stale caching)
422422
HashSet<String> files(directory->listAll());
423423
int64_t genA = segmentInfos->getCurrentSegmentGeneration(files);
424-
425-
segmentInfos->message(L"directory listing genA=" + genA);
426-
427-
// Method 2: open segments.gen and read its contents. Then we take the larger of the two gens. This way,
424+
425+
segmentInfos->message(L"directory listing genA=" + StringUtils::toString(genA));
426+
427+
// Method 2: open segments.gen and read its contents. Then we take the larger of the two gens. This way,
428428
// if either approach is hitting a stale cache (NFS) we have a better chance of getting the right generation.
429429
int64_t genB = -1;
430430
for (int32_t i = 0; i < SegmentInfos::defaultGenFileRetryCount; ++i)

0 commit comments

Comments
 (0)