Skip to content

Commit b5ed6f2

Browse files
authored
pageserver: clean up a TODO comment (#6282)
These functions don't need updating for sharding: it's fine for them to remain shard-naive, as they're only used in the context of dumping a layer file. The sharding metadata doesn't live in the layer file, it lives in the index.
1 parent d1c0232 commit b5ed6f2

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

pageserver/src/tenant/storage_layer/delta_layer.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -320,8 +320,8 @@ impl DeltaLayer {
320320
.metadata()
321321
.context("get file metadata to determine size")?;
322322

323-
// TODO(sharding): we must get the TenantShardId from the path instead of reading the Summary.
324-
// we should also validate the path against the Summary, as both should contain the same tenant, timeline, key, lsn.
323+
// This function is never used for constructing layers in a running pageserver,
324+
// so it does not need an accurate TenantShardId.
325325
let tenant_shard_id = TenantShardId::unsharded(summary.tenant_id);
326326

327327
Ok(DeltaLayer {

pageserver/src/tenant/storage_layer/image_layer.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -278,8 +278,8 @@ impl ImageLayer {
278278
.metadata()
279279
.context("get file metadata to determine size")?;
280280

281-
// TODO(sharding): we should get TenantShardId from path.
282-
// OR, not at all: any layer we load from disk should also get reconciled with remote IndexPart.
281+
// This function is never used for constructing layers in a running pageserver,
282+
// so it does not need an accurate TenantShardId.
283283
let tenant_shard_id = TenantShardId::unsharded(summary.tenant_id);
284284

285285
Ok(ImageLayer {

0 commit comments

Comments
 (0)