util

package
v0.10.3-0...-54aaeda Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 21, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReviseVChannelInfo

func ReviseVChannelInfo(vChannel *datapb.VchannelInfo)

ReviseVChannelInfo will revise the datapb.VchannelInfo for upgrade compatibility from 2.0.2

Types

type Cache

type Cache struct {
	*typeutil.ConcurrentSet[typeutil.UniqueID]
}

Cache stores flushing segments' ids to prevent flushing the same segment again and again.

Once a segment is flushed, its id will be removed from the cache.

A segment not in cache will be added into the cache when `FlushSegments` is called.
 After the flush procedure, whether the segment successfully flushed or not,
 it'll be removed from the cache. So if flush failed, the secondary flush can be triggered.

func NewCache

func NewCache() *Cache

NewCache returns a new Cache

func (*Cache) Cache

func (c *Cache) Cache(ID typeutil.UniqueID)

Cache caches a specific ID into the cache

func (*Cache) Remove

func (c *Cache) Remove(IDs ...typeutil.UniqueID)

Remove removes a set of IDs from the cache

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL