rkhachatryan commented on a change in pull request #16177:
URL: https://github.com/apache/flink/pull/16177#discussion_r658739432



##########
File path: docs/content.zh/docs/ops/metrics.md
##########
@@ -1671,6 +1671,10 @@ up an automated clock synchronisation service (like NTP) 
to avoid false latency
 of the cluster (in particular for `subtask` granularity). It is highly 
recommended to only use them for debugging 
 purposes.
 
+## State access latency tracking
+
+Flink also allows to track the keyed state access latency, and you could refer 
to [Track keyed state access latency]({{< ref 
"docs/dev/datastream/fault-tolerance/state" 
>}}#track-keyed-state-access-latency) for more details.

Review comment:
       ```suggestion
   Flink also allows to track the keyed state access latency. Please refer to 
[Track keyed state access latency]({{< ref 
"docs/dev/datastream/fault-tolerance/state" 
>}}#track-keyed-state-access-latency) for more details.
   ```
   
   **ditto English version**

##########
File path: docs/content.zh/docs/ops/metrics.md
##########
@@ -1642,7 +1642,7 @@ logged by `SystemResourcesMetricsInitializer` during the 
startup.
   </tbody>
 </table>
 
-## Latency tracking
+## End-to-End record travelling latency tracking

Review comment:
       ```suggestion
   ## End-to-End latency tracking
   ```
   
   **ditto English version**

##########
File path: docs/content.zh/docs/dev/datastream/fault-tolerance/state.md
##########
@@ -561,6 +561,17 @@ val counts: DataStream[(String, Int)] = stream
     })
 ```
 
+### 跟踪 keyed state 的访问延迟
+
+Flink also allows to track the keyed state access latency for all 
state-backends. This feature is disabled by default.
+To enable this feature you must set the 
`state.backend.latency-track.keyed-state-enabled` as true in the [Flink 
configuration]({{< ref "docs/deployment/config" 
>}}#state-backends-latency-tracking-options).
+
+Once tracking keyed state access latency is enabled, Flink will sample the 
state access latency every `N` access, in which `N` is defined by 
`state.backend.latency-track.sample-interval`.
+This configuration has the default value as 128, and a smaller value will get 
more accurate result but higher performance impact as sampled more frequently.
+
+As the type of this latency metrics is histogram, 
`state.backend.latency-track.history-size` will control the maximum number of 
recorded values in history, which has the default value as 128.
+A larger value of this configuration will occupy more memory footprint, but 
getting a more accurate result.

Review comment:
       1. I'd rather place this text under `Operations` (which currently refers 
here) because this page is more about development with Flink rather than 
running the app in production.
   
   2. Should we mention that this applies to standard RocksDB and Heap 
backends; and custom backends will get it only if they extend 
`AbstractStateBackend`? (I'm not sure)
   
   3. Some minor suggestions:
   ```suggestion
   Flink also allows to track the keyed state access latency for all 
state-backends. This feature is disabled by default.
   To enable this feature you must set the 
`state.backend.latency-track.keyed-state-enabled` to true in the [Flink 
configuration]({{< ref "docs/deployment/config" 
>}}#state-backends-latency-tracking-options).
   
   Once tracking keyed state access latency is enabled, Flink will sample the 
state access latency every `N` access, in which `N` is defined by 
`state.backend.latency-track.sample-interval`.
   This configuration has the default value of 128, and a smaller value will 
get more accurate result but higher performance impact as sampled more 
frequently.
   
   As the type of this latency metrics is histogram, 
`state.backend.latency-track.history-size` will control the maximum number of 
recorded values in history, which has the default value of 128.
   A larger value of this configuration will requrie more memory, but will 
provide a more accurate result.
   ```
   
   **ditto English version**




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to