nic-6443 commented on code in PR #14017:
URL: https://github.com/apache/apisix/pull/14017#discussion_r4217925217


##########
docs/en/latest/plugins/limit-count.md:
##########
@@ -2195,6 +2195,6 @@ With delayed synchronization (`sync_interval`), the 
counter shared through Redis
 * `delayed_sync.synced_count`: the count of the current window in Redis at 
that time.
 * `delayed_sync.local_delta`: what this APISIX instance counted since then and 
has not synchronized yet, excluding this request.
 
-`current_window.count` is then an estimate, `synced_count + local_delta + 
cost`, that does not include what other instances counted since their last 
synchronization. For a sliding window, `current_window` and `previous_window` 
describe the windows at the time of the last synchronization: the weight 
applied to the previous window is fixed at synchronization time, so 
`previous_window.weight` is the weight that was used for this request, not the 
weight at `evaluated_at_ms`. The snapshot is only refreshed after its window 
has ended, so a request arriving a few milliseconds after the window boundary 
is still checked against the previous snapshot, and its `evaluated_at_ms` is 
then later than `current_window.end_ms`.
+`current_window.count` is then an estimate, `synced_count + local_delta + 
cost`, that does not include what other instances counted since their last 
synchronization. For a sliding window, `current_window` and `previous_window` 
describe the windows at the time of the last synchronization: the weight 
applied to the previous window is fixed at synchronization time, so 
`previous_window.weight` is the weight that was used for this request, not the 
weight at `evaluated_at_ms`. The snapshot is replaced at every synchronization, 
which runs within `sync_interval` after a request, and when it expires at the 
end of its window. A request that arrives after a window boundary but before 
the next synchronization is still checked against the previous snapshot, so its 
`evaluated_at_ms` can briefly be later than `current_window.end_ms`.

Review Comment:
   The table part isn't right. Line 2198 is a standalone paragraph after the 
`delayed_sync.*` bullet list, not a table row; it had no leading `|` on master 
either, and this PR only changes its text.
   
   The wording point is fair: I split it into two sentences in 7a5566fd9, so it 
now says the snapshot is replaced at every synchronization, which runs within 
`sync_interval` after a request, and that it is also refreshed when it expires 
at the end of its window.
   



-- 
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