Skip to content

Commit 4be49e3

Browse files
authored
Merge pull request #681 from nomis/fix-ostoken-generation-refresh
Fix severe peformance issue accessing keys
2 parents 43df67c + 68c6a9e commit 4be49e3

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

src/lib/object_store/Generation.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
#include "Generation.h"
3636

3737
// Factory
38-
Generation* Generation::create(const std::string path, int umask, bool isToken /* = false */)
38+
Generation* Generation::create(const std::string path, int umask, bool isToken)
3939
{
4040
Generation* gen = new Generation(path, umask, isToken);
4141
if ((gen != NULL) && isToken && (gen->genMutex == NULL))

src/lib/object_store/Generation.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class Generation
4242
{
4343
public:
4444
// Factory
45-
static Generation* create(const std::string inPath, int inUmask, bool inIsToken = false);
45+
static Generation* create(const std::string inPath, int inUmask, bool inIsToken);
4646

4747
// Destructor
4848
virtual ~Generation();

src/lib/object_store/OSToken.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ OSToken::OSToken(const std::string inTokenPath, int inUmask)
5757
umask = inUmask;
5858

5959
tokenDir = new Directory(tokenPath);
60-
gen = Generation::create(tokenPath + OS_PATHSEP + "generation", true);
60+
gen = Generation::create(tokenPath + OS_PATHSEP + "generation", umask, true);
6161
tokenObject = new ObjectFile(this, tokenPath + OS_PATHSEP + "token.object", umask, tokenPath + OS_PATHSEP + "token.lock");
6262
tokenMutex = MutexFactory::i()->getMutex();
6363
valid = (gen != NULL) && (tokenMutex != NULL) && tokenDir->isValid() && tokenObject->valid;

src/lib/object_store/ObjectFile.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ ObjectFile::ObjectFile(OSToken* parent, std::string inPath, int inUmask, std::st
5353
{
5454
path = inPath;
5555
umask = inUmask;
56-
gen = Generation::create(path, umask);
56+
gen = Generation::create(path, umask, false);
5757
objectMutex = MutexFactory::i()->getMutex();
5858
valid = (gen != NULL) && (objectMutex != NULL);
5959
token = parent;

0 commit comments

Comments
 (0)