Commit Graph

217 Commits

Author SHA1 Message Date
levlam
fe5bf41980 Minor improvements.
GitOrigin-RevId: 45477784ae1840f217b9394e3d0cc56e1241f9ce
2020-08-07 22:14:42 +03:00
Arseny Smirnov
037bfb3776 Binlog: defragmentation of BinlogEvents buffers during reindex
GitOrigin-RevId: 89f61031d27d8aa20963a46566876a461ea3e338
2020-08-07 20:30:05 +03:00
Arseny Smirnov
80d98def74 TQueue: run_gc returns count of deleted events
GitOrigin-RevId: 7cddd57c1c2842eade83aa253209462e33629dc9
2020-08-07 19:36:23 +03:00
Arseny Smirnov
857f981847 TQueue: minor refactoring of gc
GitOrigin-RevId: 4f4d460723a60f075e2a66d2b1269bc8e41927d1
2020-08-07 14:03:39 +03:00
levlam
2097934da5 Optimize TQueue::run_gc, so it can be run arbitrary often.
GitOrigin-RevId: f7fc488cf3682683c0164c557992dbbc4eed9d4d
2020-08-07 06:06:29 +03:00
levlam
5109f43435 Use unix_time in TQueue.
GitOrigin-RevId: d49c0871c7cb1a4315e38a66c198f56cb2b89428
2020-08-06 04:02:54 +03:00
levlam
5749ddf33d Minor fixes.
GitOrigin-RevId: 6d9a609ab9c773d1e4f3fe81f84947e142e15f35
2020-08-04 22:48:23 +03:00
Arseny Smirnov
e75860b2ae BufferSlice: stats of total BufferSlices size
GitOrigin-RevId: df712161ba00c4f3d6eae9b6459c69ee046a9bda
2020-08-04 21:37:47 +03:00
levlam
7187b9c32f Erase the dummy event when new event is pushed to TQueue.
GitOrigin-RevId: 42f310f52cf74ddf32655fe3da42c731ff24e799
2020-07-25 03:11:03 +03:00
levlam
7d8d13606c Use std::map instead of VectorQueue in TQueue.
GitOrigin-RevId: a419aa0c9ee5954f8bf1681e6e4097b3e632fa0c
2020-07-25 00:37:45 +03:00
levlam
2882e96b63 Do not delete queue if there is no callback.
GitOrigin-RevId: d19a6b2c2c5ee517bae5cf809068f413217ca723
2020-07-24 14:03:59 +03:00
levlam
8132c4dfd3 Fix TQueue run_gc statistics.
GitOrigin-RevId: 2311da0ba65e33de466c3f627058ec2a973dcb76
2020-07-24 07:12:43 +03:00
levlam
85ba9e5654 Fix TQueue binlog replaying.
GitOrigin-RevId: 172d70847206253de981d38fed329276b2f778e0
2020-07-24 06:57:48 +03:00
levlam
db29976a90 Check queue constraints in TQueue::do_push.
GitOrigin-RevId: 385d120c8bdee21bb18d97699af4b7b78fa36277
2020-07-24 05:47:31 +03:00
levlam
692b0f18df Drop only one week old empty queues from TQueue.
GitOrigin-RevId: b7ce4c1b4471cfa385ca4d268e8e052db0896ef3
2020-07-24 05:26:25 +03:00
levlam
70534a8aca Add TQueue run_gc statistics.
GitOrigin-RevId: 371d38aa5c59d927b0f1e601f08ac7c7bbbdb137
2020-07-24 02:42:54 +03:00
levlam
1b2d42a7b6 Improve log messages.
GitOrigin-RevId: a431f8c5bfca3edea1293d0192ac78c9aec38de2
2020-07-15 14:28:53 +03:00
levlam
060c01ace3 Minor improvements.
GitOrigin-RevId: b4e5073248377d84cb8acdf4a032970ec5cf5df9
2020-07-14 20:54:38 +03:00
Arseny Smirnov
d701e17cc6 close(Promise<>) interface for TQueue and BinlogKeyValue
GitOrigin-RevId: d2c524407888b99c9e6207f74828eb2da29a7720
2020-07-14 19:10:26 +03:00
levlam
7767842d4c Minor fixes.
GitOrigin-RevId: b9f67c5e5edf818610c1739533f01a7873e6e1b6
2020-07-14 03:37:04 +03:00
levlam
32f9e4924f Add limit on total TQueue events size.
GitOrigin-RevId: cd0d77e4b0e2d66d7c5253a6d36bd543bca95bd1
2020-07-13 23:48:15 +03:00
levlam
416188fc67 binlog_dump: protect from accidental binlog creation and encryption.
GitOrigin-RevId: e1e624413c7f672e90b705fb954ed3000d6170c2
2020-07-13 20:46:17 +03:00
levlam
9072b73337 Make binlog reindex more aggressive.
GitOrigin-RevId: dea08e9bd9b1679c41f5e516c26cb365bdea7562
2020-07-13 16:26:36 +03:00
levlam
15c387eff0 Improve binlog_dump output.
GitOrigin-RevId: d817f60b8228d0c6270abda41dfeed8655be5493
2020-07-13 04:04:30 +03:00
levlam
27247f278a Simplify binlog_dump.
GitOrigin-RevId: dfcc9734abc7c71f88ca9df39c3fc6725680fdec
2020-07-13 03:40:03 +03:00
Arseny Smirnov
1924d6c418 experimental binlog_dump
GitOrigin-RevId: d0e897bf2ac58dbd713d3c52b13995cb3e3c20f0
2020-07-09 22:15:37 +03:00
levlam
8872fbf6ac Fix tdutils after merge.
GitOrigin-RevId: 5b9a863e405a9e3782157570156fda71bf2bb589
2020-06-26 02:24:13 +03:00
levlam
a9e95b7f4b Add TQueue::get_size.
GitOrigin-RevId: 20b842bfb145a890e149f80bff56f0fa80785337
2020-06-24 15:11:39 +03:00
levlam
3442a88413 Unify constant names style.
GitOrigin-RevId: 6e4475366b94cea6ab0331d57f254311490bdee2
2020-06-16 05:10:16 +03:00
levlam
9e263be760 Remove Pmc.h.
GitOrigin-RevId: 5f7ced9f627f6f095f8b80ce1d22ed6f09b1f79d
2020-06-13 22:43:50 +03:00
levlam
2ed9cb3b75 Minor fixes.
GitOrigin-RevId: ce9058c2075281697cc41de2ab970dd11e189f77
2020-06-13 05:13:11 +03:00
levlam
55ca575af5 Fix narrow_cast.
GitOrigin-RevId: 297ba41fd86e432b133c8415b6a1944773e025ba
2020-06-12 11:56:31 +03:00
levlam
00c30aa9dc TQueue fixes.
GitOrigin-RevId: 87dd51ab556869a6066e9837cf8da34530cfbc4b
2020-06-12 03:02:20 +03:00
levlam
fc8d92b464 Remove tqueue test from namespace td.
GitOrigin-RevId: 3cedf8f7504df4bd1f33e1ab40feb18fbf03ace7
2020-06-12 00:46:47 +03:00
levlam
bee9b67e3c Improve TQueue.
GitOrigin-RevId: 3146441d9035be886a616d8de504024df1602116
2020-06-11 23:54:56 +03:00
levlam
44155da2d8 Fix BinlogEvent size checks.
GitOrigin-RevId: 0fe66f0be34fd15618c3f19edaeec5e64072c170
2020-06-11 18:21:18 +03:00
levlam
42e3aefc02 TQueue improvements.
GitOrigin-RevId: 753aba147aed58ccba167a83dd798987ce6da177
2020-06-11 18:12:16 +03:00
levlam
2a6eebec24 Fix logevent_id type.
GitOrigin-RevId: a609c2f25c1898defe031ce90c72957a031e3f65
2020-06-11 16:52:39 +03:00
levlam
22c9927314 Minor tqueue fixes.
GitOrigin-RevId: 827a336498dd57364aa8a2ac59d97ecacb05f5de
2020-06-11 16:43:26 +03:00
Arseny Smirnov
39e58f3eb9 TQueue: extra
GitOrigin-RevId: 7f746000e546b422034c0170e068d599317764c9
2019-09-06 18:55:19 +03:00
Arseny Smirnov
7a48b9bfc0 TQueue: interface for webhooks
GitOrigin-RevId: 521f25f183d76bcbb9143270660dd48b3bf8fc83
2019-08-27 18:06:00 +03:00
Arseny Smirnov
de5cc3e214 TQueue: big rewrite
GitOrigin-RevId: dc541f0fbdbc2ecdbba70b52b494756f763e78bb
2019-08-09 20:29:17 +03:00
Arseny Smirnov
db97a337fc TQueue: bugfixes
GitOrigin-RevId: fd9d8e31594c51c89b7732db3fea6a27557a9553
2019-08-08 17:39:36 +03:00
Arseny Smirnov
5685591ff4 TQueue: store timeout in system time, drop old event when possible
GitOrigin-RevId: c1aa277d76e85e411828577ce7d6efd2d374058e
2019-08-07 19:14:36 +03:00
Arseny Smirnov
734a7e00a4 TQueue: return error in get, when from_id is clearly invalid
GitOrigin-RevId: 597c7d1928bc4bcfcdfbd87d3b898329047e74bd
2019-08-07 19:04:48 +03:00
Arseny Smirnov
3976bbb4c8 TQueue: now more than MAX_QUEUE_EVENTS events in each queue
GitOrigin-RevId: a8553f02f631fd34ef1451044c3ad7e27ee7d3dd
2019-08-07 18:36:37 +03:00
Arseny Smirnov
8226c9ab49 TQueue: do not drop tail_id whithout restart
GitOrigin-RevId: 54df1acc7b36303e128cfe1f6ac3e7ed4837eacd
2019-08-07 18:29:47 +03:00
Arseny Smirnov
62f6318edf TQueue: delete on_pop
GitOrigin-RevId: f412be72f585ba19e9cdfcc2b30151f297beb761
2019-08-07 18:13:45 +03:00
Arseny Smirnov
791d4f3172 TQueue: some fixes.
GitOrigin-RevId: f0521fd9c323e05ffaf4877b92ad42a17ee71dcd
2019-08-07 18:13:10 +03:00
Arseny Smirnov
a8c74f9432 TQueue: export from tqueue, Tqueue.{cpp,h}
GitOrigin-RevId: 045ccbd0694d4906788a38bb30f16f0f9b0ef97d
2019-08-07 14:01:22 +03:00
levlam
b21fc85219 Add BinlogInterface::add/rewrite/erase.
GitOrigin-RevId: fdb0f4f2d2af0f8ab540c0249ddfff9b9c4af8fb
2020-06-11 02:25:50 +03:00
levlam
a726450e0b Remove unneded template parameter.
GitOrigin-RevId: 77428c1488b833d95d0ed792054a295a4c182e19
2020-06-10 22:18:22 +03:00
levlam
d8a11c7fa6 Add Binlog::add/rewrite/erase.
GitOrigin-RevId: 99b0234d5d700081834ba00c79fcc3da264344be
2020-06-10 21:48:11 +03:00
levlam
4c8571d7a1 Remove binlog_erase_impl.
GitOrigin-RevId: bfe67456d0e839266897dd2e0e386c852076d57d
2020-06-10 21:24:29 +03:00
levlam
499241bc9c Add SqliteKeyValue::set debug.
GitOrigin-RevId: 070b4a7f4a2b652f57165db79ea776ce05c5865e
2020-05-17 00:23:33 +03:00
levlam
9328c20fcc Return only key's suffix in prefix_get.
GitOrigin-RevId: 4e2043356fc69741a881407146fd4e9ca385b258
2020-04-23 20:27:46 +03:00
levlam
06135cccf9 Add parameters offset and limit to getTrendingStickerSets.
GitOrigin-RevId: 360c14f4cd357d23c3537ab26ee55a5b5ed29e81
2020-04-18 01:55:54 +03:00
levlam
d5ebf00b72 Improve SQLite logging.
GitOrigin-RevId: 5a779f25594f518508a0a9df7f6c64cfb9cbc9e4
2020-03-29 00:12:51 +03:00
levlam
92df8f9827 Remove unneeded brackets.
GitOrigin-RevId: 0b8a2ae21d28e6c276db8b45ffb4d127800f5d73
2020-02-26 18:15:19 +03:00
levlam
811c4ed95c Add database path to most database errors.
GitOrigin-RevId: 469033593d39a542d517d328de546d24c76c77b1
2020-02-19 04:34:55 +03:00
levlam
38b3c1b52c Better error message.
GitOrigin-RevId: 2779dcf8fa07fbc2e191141774b34fb9c2282b64
2020-01-27 15:12:22 +03:00
levlam
0198711920 Allow to change CMAKE_INSTALL_BINDIR and CMAKE_INSTALL_INCLUDEDIR.
GitOrigin-RevId: 5704095d127c7fcf2450133745ab2ac546a1177f
2020-01-24 03:03:18 +03:00
levlam
0152d8ea2a Fix CMAKE_INSTALL_LIBDIR usages.
GitOrigin-RevId: 2bca91c97e868aa15ee8a65650938eda857429df
2020-01-24 02:01:07 +03:00
levlam
e4bfb5bcb8 Remove IGNORE_ERASE_HACK.
GitOrigin-RevId: 7b26a5c8ad5a978c47f873f397cfa27500e8df08
2020-01-19 03:05:36 +03:00
levlam
728d8d79f6 More enum class usages.
GitOrigin-RevId: 6680ce2276ced5b015a1f508f0b7b5f28b5f4a9b
2020-01-19 03:02:56 +03:00
levlam
80c35676a2 Update copyright year.
GitOrigin-RevId: 09afb551b6e637dc69739fa735b0051a38b9e14c
2020-01-01 04:23:48 +03:00
levlam
1e018da7b8 Various fixes.
GitOrigin-RevId: b09e5fda6d25bd027f6bcbcbbe8324567b8ddcf8
2019-10-22 20:01:15 +03:00
levlam
918f6a0cfd Use td::contains and td::remove instead of std::find if possible.
GitOrigin-RevId: faa0863eb49ee8ce4c2138dfec022620f71d2f6a
2019-10-22 02:12:58 +03:00
levlam
12ea695b54 Use TRY_RESULT_ASSIGN to handle responses of db_.get_statement.
GitOrigin-RevId: 0b777859b0670661493eff0a1ed6048ba5010bbd
2019-09-02 21:11:56 +03:00
levlam
c74263ce3d Better log message when database can't be opened.
GitOrigin-RevId: d5aeadb0e89fb1c9391721f716801bc239b6d9b0
2019-10-03 20:38:47 +03:00
levlam
c63144f22f Add SqliteConnectionSafe.cpp.
GitOrigin-RevId: 6e56f276c9467383c1eaa462ee7eb3530fafca55
2019-10-03 20:15:15 +03:00
levlam
0b6c1d226f Update clag-format to the latest (190926/r372920) version.
GitOrigin-RevId: 7861ae8ad28eb1f6a06ff3c6f56eff3f67b1d24c
2019-09-28 05:14:21 +03:00
levlam
bf3e159d35 Process SqliteDb shared memory file last.
GitOrigin-RevId: 6752ab25495ccb4dccc5a51cee78956ce1a9034f
2019-09-16 21:18:36 +03:00
Arseny Smirnov
5a032743e6 Fix errors from tdutils import
GitOrigin-RevId: 3709df12a3050cf05e2bb482b49490a4e874f075
2019-08-12 16:53:17 +03:00
Arseny Smirnov
cfb3d7bda4 Support recusrive transactions in sqlite usage
GitOrigin-RevId: 1afd836ebd0c8b1cc79c86c9ef548deeb3f5adaa
2019-08-09 14:31:45 +03:00
levlam
108dc0d4f8 Remove END_PARSE_FLAGS_GENERIC.
GitOrigin-RevId: c9a47a56158829aca0572bab1497e3aebcc7216d
2019-08-01 03:40:28 +03:00
Arseny Smirnov
ff3164ff04 Fd::stat returns Result<Stat> instead of Stat
GitOrigin-RevId: 7bdb5f0d65df55424db302e4df060b697d8ee11d
2019-06-19 16:31:25 +02:00
levlam
22959280c1 Binlog dump: add event size.
GitOrigin-RevId: 871d204c135226cf46e4591304d1d7413e218a62
2019-06-13 20:22:16 +03:00
Arseny Smirnov
53ce0a1ebb Fix binlog_dump
GitOrigin-RevId: bde918c7bd6a8be585d0a9a174a966709ca16474
2019-06-13 15:53:10 +03:00
Arseny Smirnov
30e1697157 FileGcWorker and FileStatsWorker cancellation
GitOrigin-RevId: 6332bd0800b32a6ca3089223be3995fd06a3118b
2019-05-01 16:15:54 +02:00
levlam
2898c8909b Add language_pack_database_size to storageStatisticsFast.
GitOrigin-RevId: 6c11b5b88edd470da8abe2a0459a9067c3cb6d21
2019-04-26 01:47:25 +03:00
levlam
470e5cec90 Decrease queries delay in MessageDb, DialogDb and SQLite key-value.
GitOrigin-RevId: 5859c8ed99af5ac20b1485187c35faa85eff4201
2019-03-31 22:46:32 +03:00
levlam
6bacc64f3c Decrease delay before binlog is flushed to hard drive.
GitOrigin-RevId: 544c7722af6f89f61374c9a92566f117721758f7
2019-03-31 22:31:43 +03:00
levlam
99ba887334 Silently truncate zero bytes at the end of encrypted binlog.
GitOrigin-RevId: 88a18a4aaf3cbfa5907ce7b50d82f871836d6281
2019-03-11 17:56:03 +03:00
levlam
58f63d36d6 Fix includes.
GitOrigin-RevId: d633dc842591cd28a03f9fba6974a171926ed229
2019-02-22 23:15:43 +03:00
levlam
93494cf048 Fix log messages style.
GitOrigin-RevId: f99e2e838220826d3dea7fdc33c43ac9918a5efd
2019-02-21 18:58:20 +03:00
levlam
dd398c5968 Fix formatting.
GitOrigin-RevId: 144f91ea1ad0a1f9a8e5e08c4c10f238b066be47
2019-02-13 00:28:47 +03:00
levlam
9b42166c68 Explicitly include common.h.
GitOrigin-RevId: 5ae32c18d0ff18aac36334b494ea526ce7da4a9a
2019-02-13 00:26:36 +03:00
Arseny Smirnov
20bfcaa979 Use LOG_CHECK where it is necessary
GitOrigin-RevId: a8bd17cc2ee6e43dcea52bb25aef9ee1f91c7ec4
2019-02-12 19:17:20 +03:00
levlam
130b49a524 Various include and other fixes.
GitOrigin-RevId: 68e03e0636cd4cff3e6fa876342ba16453630f15
2019-02-12 19:48:52 +03:00
levlam
2edc069583 Explicitly init some std::atomic.
GitOrigin-RevId: bfbe95bd1aaed9c3ade31d9a7222b223bfece347
2019-01-24 06:18:14 +03:00
levlam
424faa44f3 Use KeyValueSyncInterface and BinlogInterface in TdDb.
GitOrigin-RevId: 6e038ac9124855660da72fc64ec131a6e8211055
2019-01-07 02:44:29 +03:00
levlam
a2a7b44ad6 Use KeyValueSyncInterface in ConfigShared.
GitOrigin-RevId: 8670b43b1dc9d5619fee2081aa98ddc936820c64
2019-01-07 01:58:09 +03:00
levlam
8e822fd44f Minor interface change.
GitOrigin-RevId: 1ab4e9a57714911fa6f88440b7ded136e6eea83f
2019-01-07 00:06:52 +03:00
levlam
5438119bb4 Fix Global.h and TdDb.h includes.
GitOrigin-RevId: 89fa1ee3e8071ad3f27687f79d1a52de113f9705
2019-01-06 22:59:17 +03:00
levlam
ea06aa19d6 Forward-declare BinlogEvent.
GitOrigin-RevId: 4ea183c04ec8e5ffd0c2851db399b2a2155557ea
2019-01-06 22:11:02 +03:00
levlam
b155cfe645 Output more debug on Binlog corruption.
GitOrigin-RevId: faae21038add485d80c668e2dd4317710daeb566
2019-01-02 18:21:31 +03:00
levlam
eaebfad034 Update copyright year.
GitOrigin-RevId: 359e2b43322222922c44c430d3814b0a4c778dc6
2019-01-01 01:02:34 +03:00
levlam
b676fe509a Move UInt to UInt.h
GitOrigin-RevId: 52b6d36d1ece8c267f5548000b2592ffd3a62ded
2018-12-20 00:18:53 +03:00
levlam
e586b31a87 Add support for notifications about new calls.
GitOrigin-RevId: fc4f9c1a484832241f2059a1ec58af6e5abcb198
2018-12-18 23:59:35 +03:00