This commit is contained in:
2026-06-13 07:13:03 +00:00
parent aca0252cfd
commit 5778782737
10 changed files with 99 additions and 58 deletions

View File

@@ -53,7 +53,10 @@ func (s *_metric) LastTimestamp() uint32 {
return s.timestamps.LastTimestamp()
}
func (s *_metric) DeleteMeasures() {
func (s *_metric) OnMeasuresDeleteCommited(rec storage.MeasuresDeleteCommited) {
//s.timestamps.Reset()
//s.values.Reset()
s.XLock = false
// s.Timestamps.Renew()
// s.Values.Renew()
@@ -61,7 +64,9 @@ func (s *_metric) DeleteMeasures() {
// s.Since = 0
// s.SinceValue = 0
// s.Until = 0
// s.UntilValue = 0
s.indexLevelTails = nil
s.lastPageNo = 0
s.lastValue = 0
}
// func (s *_metric) startAppendMeasures(req tryAppendMeasuresReq, sendToStorage func(storage.AppendedMeasures)) {
@@ -197,12 +202,20 @@ func (s *_metric) StartAppendMeasures(req tryAppendMeasuresReq, tmp []byte, send
//ResultCh: req.ResultCh,
})
}
}
func (s *_metric) FinAppendMeasures(rec storage.MeasuresAppendWithGrowCommited) {
func (s *_metric) OnMeasuresAppendCommited(rec storage.MeasuresAppendCommited) {
// Видаляю state. Оригінальні Timestamps і Values вже мають останню версію
s.capturedState = nil
s.timestamps.ForgetCapturedState()
s.values.ForgetCapturedState()
}
func (s *_metric) OnMeasuresAppendWithGrowCommited(rec storage.MeasuresAppendWithGrowCommited) {
// Видаляю state. Оригінальні Timestamps і Values вже мають останню версію
s.capturedState = nil
s.timestamps.ForgetCapturedState()
s.values.ForgetCapturedState()
if rec.LastPageNo > 0 {
s.lastPageNo = rec.LastPageNo