Skip to content

sql: fix TestUnsplitRanges to work with external test tenants#160526

Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom
rafiss:mt-TestUnsplitRanges
Jan 6, 2026
Merged

sql: fix TestUnsplitRanges to work with external test tenants#160526
craig[bot] merged 1 commit intocockroachdb:masterfrom
rafiss:mt-TestUnsplitRanges

Conversation

@rafiss
Copy link
Copy Markdown
Collaborator

@rafiss rafiss commented Jan 6, 2026

Previously, TestUnsplitRanges was skipped in external test tenant mode because it scanned meta ranges directly and performed AdminSplit/ AdminUnsplit operations that external tenants cannot do.

This commit fixes the test by:

  1. Using the system layer's DB for meta range operations (scanning meta ranges, checking sticky bits, splitting ranges) since tenants cannot access meta ranges directly.
  2. Using the application layer's DB for table data operations which tenants can access.
  3. Granting the CanAdminUnsplit capability to the external tenant so the GC job can unsplit ranges after dropping tables/indexes.

Resolves: #142388
Epic: CRDB-48944

Release note: None

Previously, TestUnsplitRanges was skipped in external test tenant mode
because it scanned meta ranges directly and performed AdminSplit/
AdminUnsplit operations that external tenants cannot do.

This commit fixes the test by:
1. Using the system layer's DB for meta range operations (scanning
   meta ranges, checking sticky bits, splitting ranges) since tenants
   cannot access meta ranges directly.
2. Using the application layer's DB for table data operations which
   tenants can access.
3. Granting the CanAdminUnsplit capability to the external tenant so
   the GC job can unsplit ranges after dropping tables/indexes.

Resolves: cockroachdb#142388
Epic: CRDB-48944

Release note: None
@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

@rafiss rafiss requested review from a team and spilchen January 6, 2026 15:39
Copy link
Copy Markdown
Collaborator

@fqazi fqazi left a comment

Choose a reason for hiding this comment

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

:lgtm:

@fqazi reviewed 1 file and all commit messages, and made 1 comment.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @spilchen).

@rafiss
Copy link
Copy Markdown
Collaborator Author

rafiss commented Jan 6, 2026

tftr!

bors r+

craig bot pushed a commit that referenced this pull request Jan 6, 2026
159819: cmd: add ghsearchdump and ghweeklysummary r=wenyihu6 a=wenyihu6

Epic: none 
Release note: none

---
**ghsearchdump**


---
**cmd/ghweeklysummary: add tool for generating weekly PR summaries**

```
Example usage:

# Last 1 week
go run ./pkg/cmd/ghweeklysummary --author wenyihu6 --weeks 1

# Specific date range
go run ./pkg/cmd/ghweeklysummary --author wenyihu6 --after 2025-01-01 --before 2025-02-01

# Save to file
go run ./pkg/cmd/ghweeklysummary --author wenyihu6 > weekly_summary.md
```

Release Notes: None
Epic: None

---
**cmd: move kv dev tools under pkg/cmd/kv/**

Move ghsearchdump and ghweeklysummary under pkg/cmd/kv/ for clearer
ownership. This seems okay given we already have pkg/cmd/allocsim.

```
Example usage:

❯ go run ./pkg/cmd/ghweeklysummary --author wenyihu6 --weeks 1

❯ go run ./pkg/cmd/kv/ghsearchdump \
  --search "repo:cockroachdb/cockroach author:wenyihu6" \
  --contribution-after 2025-12-12
tracking contributions from: [wenyihu6]
```



160459: kvserver: add tracing to TestStoreRangeSplitBackpressureWrites r=tbg a=stevendanna

In #160141 we observed this test fail. This test is rather stable but does depend on two goroutines sending batches to the KV server within a 100ms timeout. One suspicion is that very rarely we are too slow and this time-based coordination is not enough.

This test is rather stable and adding more sophisticated coordination will further complicate an already complicated test. Here, I add some tracing that will hopefully allow us to confirm the timing based theory if this ever happens again.

Fixes #160141

Release note: None

160499: pgwire: handle negative scale r=drewkimball,yuzefovich a=dils2k

The node could crash if it received a decimal with a negative scale value. This commit adds a check and returns an error instead.

Epic: CRDB-57539
Fixes: #158884

Release note (bug fix): CockroachDB could previously crash when handling decimals with negative scales via extended PGWire protocol and this has been fixed (an error is returned, similar to PG).

160526: sql: fix TestUnsplitRanges to work with external test tenants r=rafiss a=rafiss

Previously, TestUnsplitRanges was skipped in external test tenant mode because it scanned meta ranges directly and performed AdminSplit/ AdminUnsplit operations that external tenants cannot do.

This commit fixes the test by:
1. Using the system layer's DB for meta range operations (scanning meta ranges, checking sticky bits, splitting ranges) since tenants cannot access meta ranges directly.
2. Using the application layer's DB for table data operations which tenants can access.
3. Granting the CanAdminUnsplit capability to the external tenant so the GC job can unsplit ranges after dropping tables/indexes.

Resolves: #142388
Epic: CRDB-48944

Release note: None

Co-authored-by: Tobias Grieger <tobias.b.grieger@gmail.com>
Co-authored-by: wenyihu6 <wenyi@cockroachlabs.com>
Co-authored-by: Steven Danna <danna@cockroachlabs.com>
Co-authored-by: dils2k <dils.matchanov@gmail.com>
Co-authored-by: Rafi Shamim <rafi@cockroachlabs.com>
@craig
Copy link
Copy Markdown
Contributor

craig bot commented Jan 6, 2026

Build failed (retrying...):

craig bot pushed a commit that referenced this pull request Jan 6, 2026
158528: roachtest: add Datadog integration for test log ingestion r=golgeek a=williamchoe3

Previously, we didn't have an easy way to do full text search across CI test runs across different TC Build Configurations and branches. To do that, you would have to download the artifacts for what you wanted to search for.

This change adds a datadog package that uploads test.log files to Datadog during test cleanup on master and release branches. The implementation scans the log file serially and uses a worker pool to upload log entries in batches of 1000 using the Datadog API client. Each log entry is tagged with test metadata (test name, owner, cloud, platform, version) and includes attributes for higher cardinality fields (cluster name, build number, result, duration). See comments for more details.

The entry point for datadog upload in `roachtest` will be during the post step test in `test_runner.go.`  Added a new roachtest flag `datadog-always-upload` for e2e testing on a non release branch.  Modified TC build scripts to pass new env vars and the teamcity build properties file.

160526: sql: fix TestUnsplitRanges to work with external test tenants r=rafiss a=rafiss

Previously, TestUnsplitRanges was skipped in external test tenant mode because it scanned meta ranges directly and performed AdminSplit/ AdminUnsplit operations that external tenants cannot do.

This commit fixes the test by:
1. Using the system layer's DB for meta range operations (scanning meta ranges, checking sticky bits, splitting ranges) since tenants cannot access meta ranges directly.
2. Using the application layer's DB for table data operations which tenants can access.
3. Granting the CanAdminUnsplit capability to the external tenant so the GC job can unsplit ranges after dropping tables/indexes.

Resolves: #142388
Epic: CRDB-48944

Release note: None

160549: build: remove unused publish script for no-telemetry release r=celiala a=rail

Remove the unused script, because we no longer use it.

Epic: none
Release note: none

Co-authored-by: William Choe <williamchoe3@gmail.com>
Co-authored-by: Rafi Shamim <rafi@cockroachlabs.com>
Co-authored-by: Rail Aliiev <rail@iqchoice.com>
@craig
Copy link
Copy Markdown
Contributor

craig bot commented Jan 6, 2026

Build failed (retrying...):

@craig craig bot merged commit 4785105 into cockroachdb:master Jan 6, 2026
24 of 25 checks passed
@craig
Copy link
Copy Markdown
Contributor

craig bot commented Jan 6, 2026

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

sql: enable external-mode tenant testing for TestUnsplitRanges

3 participants