Documentation
¶
Index ¶
- Constants
- func ExtractAccessBucketFromKey(key []byte) string
- func ExtractSegmentPath(deleteIndexKey []byte) string
- func ExtractUserKey(metadataKey []byte) string
- func GetBucketedAccessKey(timestamp time.Time) string
- func IsBucketedAccessKey(key []byte) bool
- func IsDeleteIndexKey(key []byte) bool
- func IsDeletionQueueKey(key []byte) bool
- func IsInternalKey(key []byte) bool
- func IsMetadataKey(key []byte) bool
- func IsSyncKey(key []byte) bool
- func MakeBucketedAccessIndexKey(key string) []byte
- func MakeBucketedAccessKey(key string, accessTime time.Time) []byte
- func MakeCompactionKey(ts int64, key string) []byte
- func MakeDeleteIndexKey(segmentPath string) []byte
- func MakeDeletionQueueKey(timestamp int64, filepath string) []byte
- func MakeMetadataKey(userKey string) []byte
- func MakeSyncKey(filepath string) []byte
- func ParseBucketedAccessKey(bucketedKey []byte) (string, time.Time, error)
- func ParseCompactionIndexRow(k, v []byte) (userKey, filePath string, ok bool)
- func ParseDeletionQueueKey(key []byte) (int64, string, error)
- func ParseSyncKey(key []byte) (int64, string, error)
Constants ¶
const ( // MetadataPrefix is the prefix for user metadata keys stored in RocksDB. // This ensures user keys have their own namespace separate from internal keys. // Uses the same format as other internal keys (starting with !) MetadataPrefix = "!meta/" // AccessBucketPrefix is the prefix for time-bucketed access index entries // Format: !access_bucket/YYYYMMDDHH/timestamp_nano/key AccessBucketPrefix = "!access_bucket/" // AccessBucketFormat is the time format for bucket keys (YYYYMMDDHH) AccessBucketFormat = "2006010215" // AccessBucketIndexPrefix is the prefix for the secondary index mapping keys to their bucket location // Format: !bucket_index/<key> -> bucketed_key AccessBucketIndexPrefix = "!access_bucket_index/" // CompactionIndexPrefix is the prefix for all compaction index entries in RocksDB CompactionIndexPrefix = "!compact/" // CompactionIndexKeyFormat is the format for compaction index keys // Format: !compact/<timestamp>|<userKey> CompactionIndexKeyFormat = "!compact/%020d|%s" // SyncIndexPrefix is the prefix for all sync tracking entries in RocksDB SyncIndexPrefix = "!sync/" // DeletionQueuePrefix is the prefix for deletion queue entries in RocksDB DeletionQueuePrefix = "!del/" // DeleteIndexPrefix is the prefix for segment deletion tracking entries in RocksDB DeleteIndexPrefix = "!delete:segment/" )
Variables ¶
This section is empty.
Functions ¶
func ExtractAccessBucketFromKey ¶
ExtractAccessBucketFromKey extracts just the bucket portion from a full key Returns empty string if not a valid bucketed key
func ExtractSegmentPath ¶
ExtractSegmentPath extracts the segment path from a delete index key
func ExtractUserKey ¶
ExtractUserKey removes the metadata prefix from a metadata key to get the original user key
func GetBucketedAccessKey ¶
GetBucketedAccessKey returns the bucket key for a given timestamp Format: !access_bucket/YYYYMMDDHH/
func IsBucketedAccessKey ¶
IsBucketedAccessKey checks if a key is a bucketed access index key
func IsDeleteIndexKey ¶
IsDeleteIndexKey checks if a key is a delete index entry
func IsDeletionQueueKey ¶
IsDeletionQueueKey checks if a key is a deletion queue entry
func IsInternalKey ¶
IsInternalKey checks if a given key is an internal system key (starts with !)
func IsMetadataKey ¶
IsMetadataKey checks if a given key is a user metadata key (has the metadata prefix)
func MakeBucketedAccessIndexKey ¶
MakeBucketedAccessIndexKey creates a secondary index key that maps a cache key to its current bucket location Format: !bucket_index/<key>
func MakeBucketedAccessKey ¶
MakeBucketedAccessKey creates a bucketed access index key Format: !access_bucket/YYYYMMDDHH/timestamp_nano/key
func MakeCompactionKey ¶
MakeCompactionKey creates a compaction key by adding the compaction prefix to the user key
func MakeDeleteIndexKey ¶
MakeDeleteIndexKey creates a delete index key for tracking segment deletions
func MakeDeletionQueueKey ¶
MakeDeletionQueueKey creates a deletion queue key for a file Format: !del/<timestamp>/<filepath>
func MakeMetadataKey ¶
MakeMetadataKey creates a metadata key by adding the metadata prefix to the user key
func MakeSyncKey ¶
MakeSyncKey creates a sync index key for a file
func ParseBucketedAccessKey ¶
ParseBucketedAccessKey extracts components from a bucketed access key Returns: original key, access time, error
func ParseCompactionIndexRow ¶
ParseCompactionIndexRow extracts userKey, filePath and size from RocksDB file-index key/value pairs. Returns ok=false when the row does not follow the expected format.
func ParseDeletionQueueKey ¶
ParseDeletionQueueKey extracts timestamp and filepath from a deletion queue key
Types ¶
This section is empty.