You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 23, 2023. It is now read-only.
Copy file name to clipboardexpand all lines: mdata/aggmetric.go
+27-27
Original file line number
Diff line number
Diff line change
@@ -31,20 +31,20 @@ type AggMetric struct {
31
31
storeStore
32
32
cachePusher cache.CachePusher
33
33
sync.RWMutex
34
-
keyschema.AMKey
35
-
rob*ReorderBuffer
36
-
currentChunkPosint// Chunks[CurrentChunkPos] is active. Others are finished. Only valid when len(chunks) > 0, e.g. when data has been written (excl ROB data)
37
-
numChunksuint32// max size of the circular buffer
38
-
chunkSpanuint32// span of individual chunks in seconds
39
-
chunks[]*chunk.Chunk
40
-
aggregators[]*Aggregator
41
-
dropFirstChunkbool
42
-
ingestFromNextChunkT0uint32
43
-
ttluint32
44
-
lastSaveStartuint32// last chunk T0 that was added to the write Queue.
45
-
lastSaveFinishuint32// last chunk T0 successfully written to Cassandra.
46
-
lastWriteuint32// wall clock time of when last point was successfully added (possibly to the ROB)
47
-
firstTsuint32// timestamp of first point seen
34
+
key schema.AMKey
35
+
rob*ReorderBuffer
36
+
currentChunkPosint// Chunks[CurrentChunkPos] is active. Others are finished. Only valid when len(chunks) > 0, e.g. when data has been written (excl ROB data)
37
+
numChunksuint32// max size of the circular buffer
38
+
chunkSpanuint32// span of individual chunks in seconds
39
+
chunks []*chunk.Chunk
40
+
aggregators []*Aggregator
41
+
dropFirstChunkbool
42
+
ingestFromT0uint32
43
+
ttluint32
44
+
lastSaveStartuint32// last chunk T0 that was added to the write Queue.
45
+
lastSaveFinishuint32// last chunk T0 successfully written to Cassandra.
46
+
lastWriteuint32// wall clock time of when last point was successfully added (possibly to the ROB)
47
+
firstTsuint32// timestamp of first point seen
48
48
}
49
49
50
50
// NewAggMetric creates a metric with given key, it retains the given number of chunks each chunkSpan seconds long
// we set LastWrite here to make sure a new Chunk doesn't get immediately
76
76
// garbage collected right after creating it, before we can push to it.
77
77
lastWrite: uint32(time.Now().Unix()),
@@ -432,10 +432,10 @@ func (a *AggMetric) persist(pos int) {
432
432
433
433
// don't ever call with a ts of 0, cause we use 0 to mean not initialized!
434
434
func (a*AggMetric) Add(tsuint32, valfloat64) {
435
-
ifts<a.ingestFromNextChunkT0 {
435
+
ifts<a.ingestFromT0 {
436
436
// TODO: add metric to keep track of the # of points discarded
437
437
iflog.IsLevelEnabled(log.DebugLevel) {
438
-
log.Debugf("AM: discarding metric <%d,%f>: does not belong to a chunk starting after ingest-from. First chunk considered starts at %d", ts, val, a.ingestFromNextChunkT0)
438
+
log.Debugf("AM: discarding metric <%d,%f>: does not belong to a chunk starting after ingest-from. First chunk considered starts at %d", ts, val, a.ingestFromT0)
0 commit comments