refactor(cluster): make sdb ver atomic
This commit is contained in:
parent
1f2b8ae1df
commit
cfe7abce4b
|
@ -162,7 +162,4 @@ static int32_t sdbCreateDir(SSdb *pSdb) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int64_t sdbUpdateVer(SSdb *pSdb, int32_t val) {
|
int64_t sdbUpdateVer(SSdb *pSdb, int32_t val) { return atomic_add_fetch_64(&pSdb->curVer, val); }
|
||||||
pSdb->curVer += val;
|
|
||||||
return pSdb->curVer;
|
|
||||||
}
|
|
Loading…
Reference in New Issue