Skip to content

Conversation

RaduBerinde
Copy link
Member

Changes:

  • df18f0ea options: change SpanPolicyFunc to take UserKeyBounds
  • 97dec880 db: add tiering policy

Release note: none.
Epic: none.

Copy link

blathers-crl bot commented Aug 16, 2025

It looks like your PR touches production code but doesn't add or edit any test code. Did you consider adding tests to your PR?

🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.

@cockroach-teamcity
Copy link
Member

This change is Reviewable

@RaduBerinde RaduBerinde force-pushed the tiered-update-span-policy branch from ec54f3f to 6e7e03e Compare August 16, 2025 22:44
Copy link
Collaborator

@sumeerbhola sumeerbhola left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewed 7 of 7 files at r1, all commit messages.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @RaduBerinde)


pkg/storage/pebble.go line 627 at r1 (raw file):

			policy.PreferFastCompression = true
		}
		if len(policy.KeyRange.End) == 0 {

How about a comment like
// For a key >= spanPolicyLockTableEndKey, which is the last configured policy, spanPolicyFunc, returns a policy [spanPolicyLockTableEndKey, ""), so we need to fix this to not extend until infinity.


pkg/storage/pebble.go line 632 at r1 (raw file):

		return policy, nil
	}
	return pebble.SpanPolicy{}, nil

Every policy needs a populated KeyRange, so I think this needs to be KeyRange{spanPolicyLocalEndKey, ""}.

Changes:

 * [`df18f0ea`](cockroachdb/pebble@df18f0ea) options: change SpanPolicyFunc to take UserKeyBounds
 * [`97dec880`](cockroachdb/pebble@97dec880) db: add tiering policy

Release note: none.
Epic: none.
@RaduBerinde RaduBerinde force-pushed the tiered-update-span-policy branch from 6e7e03e to 642ef46 Compare August 18, 2025 15:09
Copy link
Member Author

@RaduBerinde RaduBerinde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TFTR!

Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @sumeerbhola)


pkg/storage/pebble.go line 627 at r1 (raw file):

Previously, sumeerbhola wrote…

How about a comment like
// For a key >= spanPolicyLockTableEndKey, which is the last configured policy, spanPolicyFunc, returns a policy [spanPolicyLockTableEndKey, ""), so we need to fix this to not extend until infinity.

Done.


pkg/storage/pebble.go line 632 at r1 (raw file):

Previously, sumeerbhola wrote…

Every policy needs a populated KeyRange, so I think this needs to be KeyRange{spanPolicyLocalEndKey, ""}.

Done.

Copy link
Collaborator

@sumeerbhola sumeerbhola left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewed 1 of 1 files at r2, all commit messages.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @RaduBerinde)

@RaduBerinde RaduBerinde merged commit bd044e5 into cockroachdb:tiered Aug 18, 2025
4 of 5 checks passed
@RaduBerinde RaduBerinde deleted the tiered-update-span-policy branch August 18, 2025 17:29
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.

3 participants