From 09cf7147abe1dc7d8cc3da5cc31c5b8e4a02d773 Mon Sep 17 00:00:00 2001 From: Victor Timofei Date: Tue, 15 Dec 2020 21:31:30 +0200 Subject: [PATCH] Update DeltaFIFO Documentation Kubernetes-commit: 1a4ed5ea57ac4d562311d2b2852dcc59b78725da --- tools/cache/delta_fifo.go | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tools/cache/delta_fifo.go b/tools/cache/delta_fifo.go index bfa36311..b0e2f7ae 100644 --- a/tools/cache/delta_fifo.go +++ b/tools/cache/delta_fifo.go @@ -118,7 +118,7 @@ func NewDeltaFIFOWithOptions(opts DeltaFIFOOptions) *DeltaFIFO { return f } -// DeltaFIFO is like FIFO, but differs in two ways. One is that the +// DeltaFIFO is like FIFO, but differs in three ways. One is that the // accumulator associated with a given object's key is not that object // but rather a Deltas, which is a slice of Delta values for that // object. Applying an object to a Deltas means to append a Delta @@ -128,8 +128,12 @@ func NewDeltaFIFOWithOptions(opts DeltaFIFOOptions) *DeltaFIFO { // Deleted if the older Deleted's object is a // DeletedFinalStateUnknown. // -// The other difference is that DeltaFIFO has an additional way that -// an object can be applied to an accumulator, called Sync. +// The second difference is that DeltaFIFO has an additional way that +// an object can be applied to an accumulator, called Replaced. However, +// if EmitDeltaTypeReplaced is not set to true, Sync will be used in +// replace events for backwards compatibility. +// +// The last difference is that Sync is used for periodic resync events. // // DeltaFIFO is a producer-consumer queue, where a Reflector is // intended to be the producer, and the consumer is whatever calls