mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-06 12:33:44 +02:00
Reduce maximum batcn size for status updates but increase the number of whole record commit threads.
This commit is contained in:
parent
d96aeac335
commit
cd2a4b709c
2 changed files with 2 additions and 2 deletions
|
@ -280,7 +280,7 @@ RethinkDB::RethinkDB(EmbeddedNetworkController *const nc,const Identity &myId,co
|
||||||
tmpobj["ts"] = i->second.first;
|
tmpobj["ts"] = i->second.first;
|
||||||
tmpobj["phy"] = i->second.second.toIpString(tmp2);
|
tmpobj["phy"] = i->second.second.toIpString(tmp2);
|
||||||
batch.emplace_back(tmpobj);
|
batch.emplace_back(tmpobj);
|
||||||
if (batch.size() >= 1024) {
|
if (batch.size() >= 256) {
|
||||||
R::db(this->_db).table("MemberStatus",R::optargs("read_mode","outdated")).insert(batch,R::optargs("conflict","update")).run(*rdb);
|
R::db(this->_db).table("MemberStatus",R::optargs("read_mode","outdated")).insert(batch,R::optargs("conflict","update")).run(*rdb);
|
||||||
batch.clear();
|
batch.clear();
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
|
|
||||||
#include "DB.hpp"
|
#include "DB.hpp"
|
||||||
|
|
||||||
#define ZT_CONTROLLER_RETHINKDB_COMMIT_THREADS 2
|
#define ZT_CONTROLLER_RETHINKDB_COMMIT_THREADS 8
|
||||||
|
|
||||||
namespace ZeroTier
|
namespace ZeroTier
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue