Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 30 for watchCache (0.15 sec)

  1. staging/src/k8s.io/apiserver/pkg/storage/cacher/watch_cache.go

    	klog.V(3).Infof("Replaced watchCache (rev: %v) ", resourceVersion)
    	return nil
    }
    
    func (w *watchCache) SetOnReplace(onReplace func()) {
    	w.Lock()
    	defer w.Unlock()
    	w.onReplace = onReplace
    }
    
    func (w *watchCache) Resync() error {
    	// Nothing to do
    	return nil
    }
    
    func (w *watchCache) getListResourceVersion() uint64 {
    	w.RLock()
    	defer w.RUnlock()
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 11 10:20:57 UTC 2024
    - 26.2K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apiserver/pkg/storage/cacher/cacher_testing_utils_test.go

    		if err != nil {
    			t.Fatal(err)
    		}
    
    		err = c.watchCache.waitUntilFreshAndBlock(context.TODO(), rv)
    		if err != nil {
    			t.Fatalf("WatchCache didn't caught up to RV: %v", rv)
    		}
    		c.watchCache.RUnlock()
    
    		c.watchCache.Lock()
    		defer c.watchCache.Unlock()
    		c.Lock()
    		defer c.Unlock()
    
    		if c.watchCache.resourceVersion < rv {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Oct 20 20:43:52 UTC 2023
    - 3.8K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apiserver/pkg/storage/cacher/watch_cache_interval_test.go

    	}{
    		{
    			name:                    "watchCache empty, eventsAddedToWatchcache = 0",
    			eventsAddedToWatchcache: 0,
    			intervalStartIndex:      0,
    		},
    		{
    			name:                    "watchCache partially propagated, eventsAddedToWatchcache < capacity",
    			eventsAddedToWatchcache: bufferSize,
    			intervalStartIndex:      0,
    		},
    		{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 04 09:20:10 UTC 2024
    - 11.6K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apiserver/pkg/storage/cacher/watch_cache_interval.go

    // only in cases where the window of events in the underlying
    // source can change over time - i.e. for watchCache circular
    // buffer. When the circular buffer is full and an event needs
    // to be popped off, watchCache::startIndex is incremented. In
    // this case, an interval tracking that popped event is valid
    // only if it has already been copied to its internal buffer.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 04 09:20:10 UTC 2024
    - 8.2K bytes
    - Viewed (0)
  5. staging/src/k8s.io/apiserver/pkg/storage/cacher/cacher_whitebox_test.go

    	}
    	barEvents := []watch.Event{
    		{Type: watch.Added, Object: pod1.DeepCopy()},
    		{Type: watch.Deleted, Object: pod1DeletedAt2.DeepCopy()},
    	}
    
    	cacher.watchCache.Add(pod1)
    	cacher.watchCache.Update(pod2)
    	cacher.watchCache.Update(pod3)
    	cacher.watchCache.Delete(pod4)
    
    	verifyEvents(t, allEventsWatcher, allEvents, true)
    	verifyEvents(t, fooEventsWatcher, fooEvents, true)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jun 12 10:12:02 UTC 2024
    - 82.9K bytes
    - Viewed (0)
  6. staging/src/k8s.io/apiserver/pkg/storage/cacher/cacher.go

    	// no new events will be processed in the meantime. The watchCache will be unlocked
    	// on return from this function.
    	// Note that we cannot do it under Cacher lock, to avoid a deadlock, since the
    	// underlying watchCache is calling processEvent under its lock.
    	c.watchCache.RLock()
    	defer c.watchCache.RUnlock()
    
    	var cacheInterval *watchCacheInterval
    	cacheInterval, err = c.watchCache.getAllEventsSinceLocked(requiredResourceVersion, key, opts)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jun 12 10:12:02 UTC 2024
    - 51.8K bytes
    - Viewed (0)
  7. staging/src/k8s.io/apiextensions-apiserver/test/integration/change_test.go

    	// We can't exercise them in a loop the same way as get requests, as watchcache
    	// can reject them with 429 and Retry-After: 1 if it is uninitialized and even
    	// though 429 is automatically retried, with frequent watchcache terminations and
    	// reinitializations they could either end-up being rejected N times and fail or
    	// or not initialize until the last watchcache reinitialization and then not be
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Jun 06 13:59:03 UTC 2024
    - 5.2K bytes
    - Viewed (0)
  8. staging/src/k8s.io/apiextensions-apiserver/test/integration/defaulting_test.go

    }
    
    func TestCustomResourceDefaultingWithoutWatchCache(t *testing.T) {
    	testDefaulting(t, false)
    }
    
    func testDefaulting(t *testing.T, watchCache bool) {
    	tearDownFn, apiExtensionClient, dynamicClient, err := fixtures.StartDefaultServerWithClients(t, fmt.Sprintf("--watch-cache=%v", watchCache))
    	if err != nil {
    		t.Fatal(err)
    	}
    	defer tearDownFn()
    
    	crd := defaultingFixture.DeepCopy()
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 06 05:32:34 UTC 2023
    - 21.2K bytes
    - Viewed (0)
  9. pkg/kubeapiserver/default_storage_factory_builder.go

    	{Group: "extensions", Resource: "ingresses"}:        "ingress",
    	{Group: "networking.k8s.io", Resource: "ingresses"}: "ingress",
    }
    
    // DefaultWatchCacheSizes defines default resources for which watchcache
    // should be disabled.
    func DefaultWatchCacheSizes() map[schema.GroupResource]int {
    	return map[schema.GroupResource]int{
    		{Resource: "events"}:                         0,
    		{Group: "events.k8s.io", Resource: "events"}: 0,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 29 20:14:51 UTC 2024
    - 6.6K bytes
    - Viewed (0)
  10. staging/src/k8s.io/apiserver/pkg/storage/cacher/metrics/metrics.go

    func RecordResourceVersion(resourcePrefix string, resourceVersion uint64) {
    	watchCacheResourceVersion.WithLabelValues(resourcePrefix).Set(float64(resourceVersion))
    }
    
    // RecordsWatchCacheCapacityChange record watchCache capacity resize(increase or decrease) operations.
    func RecordsWatchCacheCapacityChange(objType string, old, new int) {
    	WatchCacheCapacity.WithLabelValues(objType).Set(float64(new))
    	if old < new {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jun 07 07:39:23 UTC 2024
    - 7.5K bytes
    - Viewed (0)
Back to top