Skip to content

Feature: new slice#848

Open
Wine93 wants to merge 7 commits intomainfrom
feature/new_slice
Open

Feature: new slice#848
Wine93 wants to merge 7 commits intomainfrom
feature/new_slice

Conversation

@Wine93
Copy link
Copy Markdown
Contributor

@Wine93 Wine93 commented Apr 7, 2026

No description provided.

chuandew and others added 6 commits April 1, 2026 15:42
…g metadata

BlockKey stays pure {id, index, size} for Filename/StoreKey/LRU hash.
BlockContext wraps BlockKey + fs_id for cache layer routing (StorageClientPool).
BlockCache interface now takes BlockContext instead of BlockKey.
…s isolation

Add PrefixBlockAccesser decorator that wraps BlockAccesserImpl and
transparently prepends {fs_name}/ prefix to all object keys, enabling
multiple filesystems to share a single S3 bucket with isolated namespaces.

- New header-only PrefixBlockAccesser in prefix_block_accesser.h
- Client (vfs_hub.cc): use NewPrefixBlockAccesser with fs_info_.name
- CacheNode (storage_client_pool.cc): use NewPrefixBlockAccesser with fs_info.fs_name()
- MDS GC (gc.cc): use NewSharePrefixBlockAccesser with fs_info.fs_name()
- BR (br.cc): unchanged, operates on backup metadata not block data
…e layer

Replace old 5-field BlockKey(fs_id, ino, id, index, version) with new 3-field
BlockKey(id, index, size) + BlockContext(BlockKey + fs_id) across the entire
cache layer.

Key changes:
- Proto: Add BlockContext message wrapping BlockKey + fs_id
- CacheStore: Unified interface with BlockContext
- Stage directory: Isolated by fs_id subdirectory (inspired by JuiceFS)
- New block_key_helper.h: ParseFromFilename / ToPB / FromPB
- Client layer: Adapt BlockStore and prefetch/warmup to use BlockContext
  with proper fs_id propagation

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@Wine93 Wine93 changed the title Feature/new slice Feature: new slice Apr 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants