Repository navigation
Fix expired records not being dropped on receipt - #14154
Conversation
|
Thanks @killme2008. The Why. Every record carries a second-precision time bucket ( The new test passed because it built the bucket with What changed.
|
|
@killme2008 I pushed 9811bac to fix the The failure comes from this fix working. The stages case seeds its cold node with data built by a separate generator OAP ( The commit raises Checked locally on an OAP image built from this PR: the generator holds no |
RecordStreamProcessor decoded a record's second-precision time bucket (yyyyMMddHHmmss) as a minute bucket, which put the record's time far in the future, and compared the record's age in milliseconds against recordDataTTL converted to microseconds, so no record was ever treated as expired. Decode the bucket at second precision and convert the TTL to milliseconds, as the metrics check in IMetricsDAO.isExpiredCache does. The BanyanDB stages data generator seeds the cold node with records stamped 3 days in the past, so its OAP raises recordDataTTL to 5 days, matching the BanyanDB TTLs it sets; the stages case keeps the default. Co-authored-by: Wu Sheng <wu.sheng@foxmail.com>
9811bac to
12b0978
Compare
Thank you |
Fix expired records not being dropped on receipt
RecordStreamProcessorcompares the record age in milliseconds withrecordDataTTLconverted to microseconds. With the default TTL of 3 days, a record is only dropped once it is about 3000 days old.Convert the TTL to milliseconds, the same as the metrics check in
IMetricsDAO.isExpiredCache. Added a unit test for records just inside and just past the TTL.CHANGESlog.