Commit faaf3e82 authored by 彭勇升 pengys's avatar 彭勇升 pengys Committed by 吴晟
Browse files

Separated TTL from minute to minute, hour, day, month. (#1268)

* #1263

Separated TTL from minute to minute, hour, day, month.

* 1. Minute metric data ttl change to 90, because of the 1 hour duration condition in UI means 60 minutes.
And i prefer to setting the value up to above 50%.
2. Some description and logging.

#1263

* Add a config time named traceDataTTL for trace data TTL.

#1263

* Fixed the logger english sentence mistake.
parent af5eedeb
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -64,7 +64,7 @@ public class GlobalTraceSpanListener implements GlobalTraceIdsListener {
        for (String globalTraceId : globalTraceIds) {
            GlobalTrace globalTrace = new GlobalTrace();
            globalTrace.setId(segmentCoreInfo.getSegmentId() + Const.ID_SPLIT + globalTraceId);
            globalTrace.setGlobalTraceId(globalTraceId);
            globalTrace.setTraceId(globalTraceId);
            globalTrace.setSegmentId(segmentCoreInfo.getSegmentId());
            globalTrace.setTimeBucket(segmentCoreInfo.getMinuteTimeBucket());
            graph.start(globalTrace);
+6 −1
Original line number Diff line number Diff line
@@ -68,7 +68,12 @@ storage:
    indexShardsNumber: 2
    indexReplicasNumber: 0
    highPerformanceMode: true
    ttl: 7
    # Set a timeout on metric data. After the timeout has expired, the metric data will automatically be deleted.
    traceDataTTL: 90 # Unit is minute
    minuteMetricDataTTL: 90 # Unit is minute
    hourMetricDataTTL: 36 # Unit is hour
    dayMetricDataTTL: 45 # Unit is day
    monthMetricDataTTL: 18 # Unit is month
#storage:
#  h2:
#    url: jdbc:h2:~/memorydb
+1 −1
Original line number Diff line number Diff line
@@ -31,5 +31,5 @@ public interface IPersistenceDAO<INSERT, UPDATE, STREAM_DATA extends StreamData>

    UPDATE prepareBatchUpdate(STREAM_DATA data);

    void deleteHistory(Long startTimestamp, Long endTimestamp);
    void deleteHistory(Long timeBucketBefore);
}
+2 −2
Original line number Diff line number Diff line
@@ -73,11 +73,11 @@ public class GlobalTrace extends StreamData {
        setDataString(1, segmentId);
    }

    public String getGlobalTraceId() {
    public String getTraceId() {
        return getDataString(2);
    }

    public void setGlobalTraceId(String globalTraceId) {
    public void setTraceId(String globalTraceId) {
        setDataString(2, globalTraceId);
    }

+132 −135

File changed.

Preview size limit exceeded, changes collapsed.

Loading