Michael Erickson
Michael Erickson
I wonder if this is related to https://github.com/cockroachdb/cockroach/issues/121917?
@rafiss is this entirely serializable? If it's read committed, it might be worth waiting until https://github.com/cockroachdb/cockroach/issues/121917 is fixed.
Here's an even smaller `pkg/sql/logictest/testdata/logic_test/_tmp` testdata file that fails fairly quickly with `./dev testlogic base --config=local --files=tmp --stress`: ``` statement ok GRANT admin TO testuser statement ok CREATE TABLE t3...
Interestingly, one small change seems to fix this: moving the INSERT statement into its own command. So, if the INSERT is in the same command as CREATE TABLE, do they...
If the timestamp column has `DEFAULT current_timestamp()` it seems like even more of a red flag. (And I wonder if `DEFAULT unique_rowid()` is also a red flag, as this uses...
> (And I wonder if `DEFAULT unique_rowid()` is also a red flag, as this uses the current time internally.) Also see https://github.com/cockroachdb/cockroach/pull/54675 for `unordered_unique_rowid`.
Maybe a way to approach this would be via the new index recommendation engine. We could recommend a hash-sharded index when the key seems like something sequential.
Adding SQL Queries team so that we can consider doing something with index recommendations.
@bodagovsky good point, I think it would make sense to check for these specific functions in the column's `DEFAULT` expression rather than checking the column type: - `clock_timestamp` - `current_date`...