Commit acf8d6ac authored by Barry Perlman's avatar Barry Perlman Committed by Yoni Fogel

Closes #2498 [t:2498] Made DICTIONARY_ID 64 bits.

git-svn-id: file:///svn/toku/tokudb@20383 c7de825b-a66e-492c-adef-691d508d4ae1
parent 253ea741
......@@ -415,11 +415,11 @@ brtnode_memory_size (BRTNODE node)
}
// assign unique dictionary id
static uint32_t dict_id_serial = 1;
static uint64_t dict_id_serial = 1;
static DICTIONARY_ID
next_dict_id(void) {
uint32_t i = toku_sync_fetch_and_increment_uint32(&dict_id_serial);
assert(i);
uint32_t i = toku_sync_fetch_and_increment_uint64(&dict_id_serial);
assert(i); // guarantee unique dictionary id by asserting 64-bit counter never wraps
DICTIONARY_ID d = {.dictid = i};
return d;
}
......
......@@ -59,7 +59,7 @@ typedef struct __toku_lsn { u_int64_t lsn; } LSN;
typedef struct {u_int32_t fileid;} FILENUM;
#define FILENUM_NONE ((FILENUM){UINT32_MAX})
typedef struct {u_int32_t dictid;} DICTIONARY_ID;
typedef struct {u_int64_t dictid;} DICTIONARY_ID;
#define DICTIONARY_ID_NONE ((DICTIONARY_ID){0})
typedef struct {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment