Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-16782

Avoid unnecessary check on expired time state when we set visibility as ReturnExpiredIfNotCleanedUp

    XMLWordPrintableJSON

Details

    Description

      Current implementation of getting unexpired value would always check whether this ttl value is expired first:

      // code placeholder
      <V> V getUnexpired(TtlValue<V> ttlValue) {
              return ttlValue == null || (expired(ttlValue) && !returnExpired) ? null : ttlValue.getUserValue();
      }
      

      However, this check could be avoided if we set return expired time, we could improve the performance by check whether to returnExpired first.

      Attachments

        Issue Links

          Activity

            People

              yunta Yun Tang
              yunta Yun Tang
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 10m
                  10m