Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

roachtest: gorm failed #72023

Closed
cockroach-teamcity opened this issue Oct 27, 2021 · 7 comments · Fixed by #72346
Closed

roachtest: gorm failed #72023

cockroach-teamcity opened this issue Oct 27, 2021 · 7 comments · Fixed by #72346
Assignees
Labels
branch-master Failures and bugs on the master branch. C-test-failure Broken test (automatically or manually discovered). O-roachtest O-robot Originated from a bot.

Comments

@cockroach-teamcity
Copy link
Member

roachtest.gorm failed with artifacts on master @ 965b99b1a05eb893ee908d852680824a0bd4ffe3:

The test failed on branch=master, cloud=gce:
test artifacts and logs in: /home/agent/work/.go/src/github.com/cockroachdb/cockroach/artifacts/gorm/run_1
	orm_helpers.go:245,orm_helpers.go:171,java_helpers.go:220,gorm.go:132,test_runner.go:777: 
		Tests run on Cockroach v22.1.0-alpha.00000000-711-g965b99b1a0
		Tests run against gorm v1.22.0
		1 Total Tests Run
		0 tests passed
		1 test failed
		0 tests skipped
		0 tests ignored
		0 tests passed unexpectedly
		1 test failed unexpectedly
		0 tests expected failed but skipped
		0 tests expected failed but not run
		---
		--- FAIL: tests.[build failed] - unknown (unexpected)
		For a full summary look at the gorm artifacts 
		
		An updated blocklist (gormBlocklist22_1) is available in the artifacts' gorm log
Help

See: roachtest README

|

See: How To Investigate (internal)

Same failure on other branches

/cc @cockroachdb/sql-experience

This test on roachdash | Improve this report!

@cockroach-teamcity cockroach-teamcity added branch-master Failures and bugs on the master branch. C-test-failure Broken test (automatically or manually discovered). O-roachtest O-robot Originated from a bot. release-blocker Indicates a release-blocker. Use with branch-release-2x.x label to denote which branch is blocked. labels Oct 27, 2021
@RichardJCai RichardJCai removed the release-blocker Indicates a release-blocker. Use with branch-release-2x.x label to denote which branch is blocked. label Oct 27, 2021
@RichardJCai
Copy link
Contributor

Likely something recently merged caused this and #72022 to fail.

Will keep an eye out.

@cockroach-teamcity
Copy link
Member Author

roachtest.gorm failed with artifacts on master @ d91fead28392841a943251842fbd43a0affb2eca:

The test failed on branch=master, cloud=gce:
test artifacts and logs in: /home/agent/work/.go/src/github.com/cockroachdb/cockroach/artifacts/gorm/run_1
	orm_helpers.go:245,orm_helpers.go:171,java_helpers.go:220,gorm.go:132,test_runner.go:777: 
		Tests run on Cockroach v22.1.0-alpha.00000000-757-gd91fead283-dirty
		Tests run against gorm v1.22.1
		1 Total Tests Run
		0 tests passed
		1 test failed
		0 tests skipped
		0 tests ignored
		0 tests passed unexpectedly
		1 test failed unexpectedly
		0 tests expected failed but skipped
		0 tests expected failed but not run
		---
		--- FAIL: tests.[build failed] - unknown (unexpected)
		For a full summary look at the gorm artifacts 
		
		An updated blocklist (gormBlocklist22_1) is available in the artifacts' gorm log
Help

See: roachtest README

|

See: How To Investigate (internal)

Same failure on other branches

/cc @cockroachdb/sql-experience

This test on roachdash | Improve this report!

@cockroach-teamcity
Copy link
Member Author

roachtest.gorm failed with artifacts on master @ 40bd241158c8dd4a68d277fa732b91f56e411b38:

The test failed on branch=master, cloud=gce:
test artifacts and logs in: /home/agent/work/.go/src/github.com/cockroachdb/cockroach/artifacts/gorm/run_1
	orm_helpers.go:245,orm_helpers.go:171,java_helpers.go:220,gorm.go:132,test_runner.go:777: 
		Tests run on Cockroach v22.1.0-alpha.00000000-785-g40bd241158
		Tests run against gorm v1.22.2
		1 Total Tests Run
		0 tests passed
		1 test failed
		0 tests skipped
		0 tests ignored
		0 tests passed unexpectedly
		1 test failed unexpectedly
		0 tests expected failed but skipped
		0 tests expected failed but not run
		---
		--- FAIL: tests.[build failed] - unknown (unexpected)
		For a full summary look at the gorm artifacts 
		
		An updated blocklist (gormBlocklist22_1) is available in the artifacts' gorm log
Help

See: roachtest README

|

See: How To Investigate (internal)

Same failure on other branches

/cc @cockroachdb/sql-experience

This test on roachdash | Improve this report!

@cockroach-teamcity
Copy link
Member Author

roachtest.gorm failed with artifacts on master @ db229cad354c2776ea35c9dc4f78e6ce66b9437c:

The test failed on branch=master, cloud=gce:
test artifacts and logs in: /home/agent/work/.go/src/github.com/cockroachdb/cockroach/artifacts/gorm/run_1
	orm_helpers.go:245,orm_helpers.go:171,java_helpers.go:220,gorm.go:132,test_runner.go:777: 
		Tests run on Cockroach v22.1.0-alpha.00000000-827-gdb229cad35
		Tests run against gorm v1.22.2
		1 Total Tests Run
		0 tests passed
		1 test failed
		0 tests skipped
		0 tests ignored
		0 tests passed unexpectedly
		1 test failed unexpectedly
		0 tests expected failed but skipped
		0 tests expected failed but not run
		---
		--- FAIL: tests.[build failed] - unknown (unexpected)
		For a full summary look at the gorm artifacts 
		
		An updated blocklist (gormBlocklist22_1) is available in the artifacts' gorm log
Help

See: roachtest README

|

See: How To Investigate (internal)

Same failure on other branches

/cc @cockroachdb/sql-experience

This test on roachdash | Improve this report!

@cockroach-teamcity
Copy link
Member Author

roachtest.gorm failed with artifacts on master @ a15b840db34de504bf060b2599276e049cc64799:

The test failed on branch=master, cloud=gce:
test artifacts and logs in: /home/agent/work/.go/src/github.com/cockroachdb/cockroach/artifacts/gorm/run_1
	orm_helpers.go:245,orm_helpers.go:171,java_helpers.go:220,gorm.go:132,test_runner.go:777: 
		Tests run on Cockroach v22.1.0-alpha.00000000-834-ga15b840db3-dirty
		Tests run against gorm v1.22.2
		1 Total Tests Run
		0 tests passed
		1 test failed
		0 tests skipped
		0 tests ignored
		0 tests passed unexpectedly
		1 test failed unexpectedly
		0 tests expected failed but skipped
		0 tests expected failed but not run
		---
		--- FAIL: tests.[build failed] - unknown (unexpected)
		For a full summary look at the gorm artifacts 
		
		An updated blocklist (gormBlocklist22_1) is available in the artifacts' gorm log
Help

See: roachtest README

|

See: How To Investigate (internal)

Same failure on other branches

/cc @cockroachdb/sql-experience

This test on roachdash | Improve this report!

@cockroach-teamcity
Copy link
Member Author

roachtest.gorm failed with artifacts on master @ f69253e3d1cfe798821ea1b1c85aeb79e9eece32:

The test failed on branch=master, cloud=gce:
test artifacts and logs in: /home/agent/work/.go/src/github.com/cockroachdb/cockroach/artifacts/gorm/run_1
	orm_helpers.go:245,orm_helpers.go:171,java_helpers.go:220,gorm.go:132,test_runner.go:777: 
		Tests run on Cockroach v22.1.0-alpha.00000000-864-gf69253e3d1
		Tests run against gorm v1.22.2
		1 Total Tests Run
		0 tests passed
		1 test failed
		0 tests skipped
		0 tests ignored
		0 tests passed unexpectedly
		1 test failed unexpectedly
		0 tests expected failed but skipped
		0 tests expected failed but not run
		---
		--- FAIL: tests.[build failed] - unknown (unexpected)
		For a full summary look at the gorm artifacts 
		
		An updated blocklist (gormBlocklist22_1) is available in the artifacts' gorm log
Help

See: roachtest README

|

See: How To Investigate (internal)

Same failure on other branches

/cc @cockroachdb/sql-experience

This test on roachdash | Improve this report!

@cockroach-teamcity
Copy link
Member Author

roachtest.gorm failed with artifacts on master @ 05d36621ae805e644d98ef6b35d453ae16255ccc:

The test failed on branch=master, cloud=gce:
test artifacts and logs in: /home/agent/work/.go/src/github.com/cockroachdb/cockroach/artifacts/gorm/run_1
	orm_helpers.go:245,orm_helpers.go:171,java_helpers.go:220,gorm.go:132,test_runner.go:777: 
		Tests run on Cockroach v22.1.0-alpha.00000000-899-g05d36621ae
		Tests run against gorm v1.22.2
		1 Total Tests Run
		0 tests passed
		1 test failed
		0 tests skipped
		0 tests ignored
		0 tests passed unexpectedly
		1 test failed unexpectedly
		0 tests expected failed but skipped
		0 tests expected failed but not run
		---
		--- FAIL: tests.[build failed] - unknown (unexpected)
		For a full summary look at the gorm artifacts 
		
		An updated blocklist (gormBlocklist22_1) is available in the artifacts' gorm log
Help

See: roachtest README

|

See: How To Investigate (internal)

Same failure on other branches

/cc @cockroachdb/sql-experience

This test on roachdash | Improve this report!

craig bot pushed a commit that referenced this issue Nov 3, 2021
69614: spanconfig: introduce spanconfig.KVSubscriber r=irfansharif a=irfansharif

KVSubscriber presents a consistent[^1] snapshot of a spanconfig.StoreReader that's incrementally maintained with changes made to the global span configurations state. The maintenance happens transparently; callers can subscribe to learn about what key spans may have seen a configuration change. After learning about a span update, consulting the embedded StoreReader would retrieve an up-to-date[^2] config for it.

When a callback is first installed, it's invoked with the [min,max) span -- a shorthand to indicate that callers should consult the StoreReader for all spans of interest. Subsequent updates are of the more incremental kind. It's possible that the span updates received are no-ops, i.e.  consulting the StoreReader for the given span would retrieve the last config observed for the span[^2].  

```go
type KVSubscriber interface {
  StoreReader
  Subscribe(func(updated roachpb.Span))
}
```

Internally we maintain a rangefeed over the global store of span configurations (system.span_configurations), applying updates from it into an embedded spanconfig.Store. A read-only view of this data structure (spanconfig.StoreReader) is exposed as part of the KVSubscriber interface. Rangefeeds used as is don't offer any ordering guarantees with respect to updates made over non-overlapping keys, which is something we care about[^4]. For that reason we make use of a rangefeed buffer, accumulating raw rangefeed updates and flushing them out en-masse in timestamp order when the rangefeed frontier is bumped[^5]. If the buffer overflows (as dictated by the memory limit the KVSubscriber is instantiated with), the subscriber is wound down and an appropriate error is returned to the caller.

When running into the errors above, it's safe for the caller to re-subscribe to effectively re-establish the underlying rangefeeds. When re-establishing a new rangefeed and populating a spanconfig.Store using the contents of the initial scan[^6], we wish to preserve the existing spanconfig.StoreReader.  Discarding it would entail either blocking all external readers until a new spanconfig.StoreReader was fully populated, or presenting an inconsistent view of the spanconfig.Store that's currently being populated. For new rangefeeds what we do then is route all updates from the initial scan to a fresh spanconfig.Store, and once the initial scan is done, swap at the source for the exported spanconfig.StoreReader. During the initial scan, concurrent readers would continue to observe the last spanconfig.StoreReader if any. After the swap, it would observe the more up-to-date source instead.  Future incremental updates will also target the new source. When this source swap occurs, we inform handlers of the need to possibly refresh their view of all configs.  

This commit also wires up the KVSubscriber into KV stores, replacing the use of the gossiped system config span (possible given the StoreReader interface, only happens if a testing flag/env var is set).  

[^1]: The contents of the StoreReader at t1 corresponds exactly to the contents of the global span configuration state at t0 where t0 <= t1. If the StoreReader is read from at t2 where t2 > t1, it's guaranteed to observe a view of the global state at t >= t0.
[^2]: For the canonical KVSubscriber implementation, this is typically the closed timestamp target duration.
[^3]: The canonical KVSubscriber implementation internally re-establishes feeds when errors occur, possibly re-transmitting earlier updates (usually through a lazy [min,max) span) despite possibly not needing to. We could do a bit better and diff the two data structures, emitting only targeted updates.
[^4]: For a given key k, it's config may be stored as part of a larger span S (where S.start <= k < S.end). It's possible for S to get deleted and replaced with sub-spans S1...SN in the same transaction if the span is getting split. When applying these updates, we need to make sure to process the deletion event for S before processing S1...SN.
[^5]: In our example above deleting the config for S and adding configs for S1...Nwe want to make sure that we apply the full set of updates all at once -- lest we expose the intermediate state where the config for S was deleted but the configs for S1...SN were not yet applied.
[^6]: When tearing down the subscriber due to underlying errors, we could also surface a checkpoint to use the next time the subscriber is established. That way we can avoid the full initial scan over the span configuration state and simply pick up where we left off with our existing spanconfig.Store.

Release note: None

71239: sql: improve historical descriptor look up efficiency r=jameswsj10 a=jameswsj10

Fixes #70692. The existing implementation for looking up old
historical descriptors required multiple round trips to storage.
This improvement requires only 1, at most 2, KV calls to storage
by using a single ExportRequest.

Release note (performance improvement): reduce kv calls when
looking up old historical descriptors to 1 or at most 2.

72314: kvserver: trim state used from snapshots r=erikgrinaker a=tbg

Snapshots contain a serialized copy of the `ReplicaState`. However, the
snapshot itself contains that data already. Having two sources of data
that may be interpreted differently can lead to problems, as we saw in
[#72239].

This commit deprecates using the entire ReplicaState. Instead, we pick
out the descriptor and ignore everything else. Instead of using the
copy of the state to initialize the recipient's in-memory state, we
now use a state loader.

In 22.2 we can only send the descriptor but maybe we won't do that; for
logging and debugging it's kind of nice to have everything present.

Fixes #72222.

[#72239]: #72239

Release note: None

72323: sql: fix excess privileges being created from default privileges. r=RichardJCai a=RichardJCai

Release note (bug fix): Previously, when creating an object
default privileges from users that were not the user creating
the object would be added to the privileges of the object.
This fix ensures only the relevant default privileges are applied.

Resolves #72322

72346: roachtest: fix gorm roachtest r=rafiss a=RichardJCai

Release note: None

Fixes #72023

72352: server,cli: fix improperly wrapped errors r=knz a=rafiss

refs #42510

I'm working on a linter that detects errors that are not wrapped
correctly, and it discovered these.

Release note: None

72366: roachtest: update ruby-pg blocklist for 22.1 r=rafiss a=ZhouXing19

Fixes #72316

Release note: None

72390: roachprod: avoid flaky test due to unused functions r=[RaduBerinde,stevendanna,rail] a=healthy-pod

Merging #71660 trigerred a flaky test due to unused functions.

This patch avoids that test by making use of / commenting out unused functions.

Release note: None

Co-authored-by: irfan sharif <[email protected]>
Co-authored-by: jameswsj10 <[email protected]>
Co-authored-by: Tobias Grieger <[email protected]>
Co-authored-by: richardjcai <[email protected]>
Co-authored-by: Rafi Shamim <[email protected]>
Co-authored-by: Jane Xing <[email protected]>
Co-authored-by: Ahmad Abedalqader <[email protected]>
@craig craig bot closed this as completed in #72346 Nov 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
branch-master Failures and bugs on the master branch. C-test-failure Broken test (automatically or manually discovered). O-roachtest O-robot Originated from a bot.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants