Decrease queries delay in MessageDb, DialogDb and SQLite key-value.

GitOrigin-RevId: 5859c8ed99af5ac20b1485187c35faa85eff4201
This commit is contained in:
levlam 2019-03-31 22:46:32 +03:00
parent 586a812016
commit 470e5cec90
3 changed files with 3 additions and 3 deletions

View File

@ -356,7 +356,7 @@ class DialogDbAsync : public DialogDbAsyncInterface {
DialogDbSyncInterface *sync_db_ = nullptr;
static constexpr size_t MAX_PENDING_QUERIES_COUNT{50};
static constexpr double MAX_PENDING_QUERIES_DELAY{1};
static constexpr double MAX_PENDING_QUERIES_DELAY{0.01};
vector<Promise<>> pending_writes_;
double wakeup_at_ = 0;
template <class F>

View File

@ -1027,7 +1027,7 @@ class MessagesDbAsync : public MessagesDbAsyncInterface {
MessagesDbSyncInterface *sync_db_ = nullptr;
static constexpr size_t MAX_PENDING_QUERIES_COUNT{50};
static constexpr double MAX_PENDING_QUERIES_DELAY{1};
static constexpr double MAX_PENDING_QUERIES_DELAY{0.01};
std::vector<Promise<>> pending_writes_;
double wakeup_at_ = 0;
template <class F>

View File

@ -87,7 +87,7 @@ class SqliteKeyValueAsync : public SqliteKeyValueAsyncInterface {
std::shared_ptr<SqliteKeyValueSafe> kv_safe_;
SqliteKeyValue *kv_ = nullptr;
static constexpr double MAX_PENDING_QUERIES_DELAY = 1;
static constexpr double MAX_PENDING_QUERIES_DELAY = 0.01;
static constexpr size_t MAX_PENDING_QUERIES_COUNT = 100;
std::unordered_map<string, optional<string>> buffer_;
std::vector<Promise<>> buffer_promises_;