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
receiver/k8sobjects: close race window between sendInitialState and watch
Use the list ResourceVersion returned by sendInitialState directly as
the watch starting point on the first iteration, eliminating a redundant
second List() call and the race window it created.
Previously, sendInitialState() did a List() and then getResourceVersion()
did another List() to determine where to start watching. Events occurring
between the two calls could be missed or duplicated.
Now sendInitialState() returns the list's own ResourceVersion (always >=
any individual object RV), which is used directly on the first watch
iteration. Subsequent iterations (e.g. after 410 Gone) fall back to
getResourceVersion() as before.
Also update the checkpoint with the list RV after sendInitialState so
the persisted value accurately reflects the snapshot point of the
listing, not just the highest individual object RV.
Co-authored-by: Dhruv Shah <dhruv.shah@sumologic.com>
Copy file name to clipboardExpand all lines: receiver/k8seventsreceiver/README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,7 +33,7 @@ the K8s API server. This can be one of `none` (for no auth), `serviceAccount`
33
33
-`namespaces` (default = `all`): An array of `namespaces` to collect events from.
34
34
This receiver will continuously watch all the `namespaces` mentioned in the array for
35
35
new events.
36
-
-`storage` (default: none): specifies the storage extension to use for persisting resourceVersions. Required when `persist_resource_version` is enabled.
36
+
-`storage` (default: none): specifies the storage extension to use for persisting resourceVersions. Required when `persist_resource_version` is enabled. The attached storage should be a persistent volume, which is accessible by all the nodes in the given cluster. If local volume is used, persistence will break when the pod is moved to another node.
37
37
-`persist_resource_version` (default: `false`): when set to `true`, the receiver persists the resourceVersion after processing each event. On restart, the receiver resumes watching from the persisted resourceVersion, preventing duplicate events. Requires a `storage` extension to be configured.
Copy file name to clipboardExpand all lines: receiver/k8sobjectsreceiver/README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -69,7 +69,7 @@ use this config to specify the group to select. By default, it will select the f
69
69
For example, `events` resource is available in both `v1` and `events.k8s.io/v1` APIGroup. In
70
70
this case, it will select `v1` by default.
71
71
- `k8s_leader_elector` (default: none): if specified, will enable Leader Election by using `k8sleaderelector` extension
72
-
- `storage` (default: none): specifies the storage extension to use for persisting resourceVersions. Required when `persist_resource_version` is enabled.
72
+
- `storage` (default: none): specifies the storage extension to use for persisting resourceVersions. Required when `persist_resource_version` is enabled. The attached storage should be a persistent volume, which is accessible by all the nodes in the given cluster. If local volume is used, persistence will break when the pod is moved to another node.
73
73
- `persist_resource_version` (default: `false`): when set to `true` (watch-mode only), the receiver persists the resourceVersion after processing each event. On restart, the receiver resumes watching from the persisted resourceVersion, preventing duplicate events. Requires a `storage` extension to be configured.
0 commit comments