Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
44343: Turn on temporary tables for roachtests r=apantel a=apantel

This will break some roachtests, but will make it easier to get into a fully working state with temporary tables.

44540: sql: fix FK schema resolution error display for temp tables r=solongordon a=otan

We previously assumed PublicSchema for printing out bad FK
related errors for display, but this invariant no longer holds for
temporary tables. The aim for this PR is to fix that.

To do this, this PR adds a new package `schema` which contains
functionality that allows for resolving schema names by ID
without introducing a cyclic dependency on `sql/row` and `sql`. This can
go away once we use descriptors to store name data, instead of requiring
a KV lookup.

Release note: None

44613: colcontainer: clean up DiskQueueCfg r=yuzefovich a=asubiotto

Check individual commits for details.

44618: colexec: Add COCKROACH_RANDOMIZE_BATCH_SIZE env variable to colexec test suites r=Azhng a=Azhng

Added `COCKROACH_BATCH_SIZE` environment variable so we can set the batch size when running test or benchmark. 

Release note (sql_change): Batch size randomization in vectorize engine
tests and benchmarks can now be disabled using COCKROACH_RANDOMIZE_BATCH_SIZE
env variable.

44634: storageccl: fix flakey TestRandomKeyAndTimestampExport r=itsbilal a=ajwerner

Sometimes the maxSize would line up exactly with the last key. When this
happened the logic to test the maxSize parameter was incorrect. This adds
logic to deal with that case and unflake the test.

Fixes #44589

Release note: None

Co-authored-by: Adam Pantel <adam@cockroachlabs.com>
Co-authored-by: Oliver Tan <otan@cockroachlabs.com>
Co-authored-by: Alfonso Subiotto Marques <alfonso@cockroachlabs.com>
Co-authored-by: Azhng <archer.xn@gmail.com>
Co-authored-by: Andrew Werner <ajwerner@cockroachlabs.com>
  • Loading branch information
6 people committed Feb 3, 2020
6 parents 76598dc + 32e717f + 54b78c5 + eead563 + 8abf99f + 0855e01 commit 31513b7
Show file tree
Hide file tree
Showing 16 changed files with 264 additions and 392 deletions.
6 changes: 6 additions & 0 deletions pkg/ccl/storageccl/export_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,12 @@ func assertEqualKVs(
lessThisKey := dataSizeWhenExceeded - uint64(len(kv.Key.Key)+len(kv.Value))
if lessThisKey >= maxSize {
dataSizeWhenExceeded = lessThisKey
// It might be the case that this key would lead to an SST of exactly
// max size, in this case we overwrite max size to be less so that
// we still generate an error.
if dataSizeWhenExceeded == maxSize {
maxSize--
}
} else {
break
}
Expand Down
71 changes: 39 additions & 32 deletions pkg/cmd/roachtest/gopg_blacklist.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,38 +65,45 @@ var gopgBlackList20_1 = blacklist{
}

var gopgBlackList19_2 = blacklist{
"pg | CopyFrom/CopyTo | copies corrupted data to a table": "5807",
"pg | CopyFrom/CopyTo | copies data from a table and to a table": "5807",
"pg | CountEstimate | works": "17511",
"pg | CountEstimate | works when there are no results": "17511",
"pg | CountEstimate | works with GROUP": "17511",
"pg | CountEstimate | works with GROUP when there are no results": "17511",
"pg | DB nulls | nil ptr inserts non-null value": "5807",
"pg | DB nulls | nil ptr inserts null value": "5807",
"pg | DB nulls | sql.NullInt64 inserts non-null value": "5807",
"pg | DB nulls | sql.NullInt64 inserts null value": "5807",
"pg | DB uint64 in struct field | is appended and scanned as int64": "5807",
"pg | DB.Select | selects bytea": "5807",
"pg | DB.Select | selects into embedded struct pointer": "5807",
"pg | HookTest | calls AfterSelect for a slice model": "5807",
"pg | HookTest | calls AfterSelect for a struct model": "5807",
"pg | HookTest | calls BeforeDelete and AfterDelete": "5807",
"pg | HookTest | calls BeforeInsert and AfterInsert": "5807",
"pg | HookTest | calls BeforeUpdate and AfterUpdate": "5807",
"pg | HookTest | does not call BeforeDelete and AfterDelete for nil model": "5807",
"pg | HookTest | does not call BeforeUpdate and AfterUpdate for nil model": "5807",
"pg | Listener | is closed when DB is closed": "41522",
"pg | Listener | listens for notifications": "41522",
"pg | Listener | reconnects on receive error": "41522",
"pg | Listener | returns an error on timeout": "41522",
"pg | Listener | supports concurrent Listen and Receive": "41522",
"pg | soft delete | model Deleted allows to select deleted model": "5807",
"pg | soft delete | model ForceDelete deletes the model": "5807",
"pg | soft delete | model soft deletes the model": "5807",
"pg | soft delete | nil model Deleted allows to select deleted model": "5807",
"pg | soft delete | nil model ForceDelete deletes the model": "5807",
"pg | soft delete | nil model soft deletes the model": "5807",
"v9.ExampleDB_Model_postgresArrayStructTag": "5807",
"pg | CopyFrom/CopyTo | copies corrupted data to a table": "5807",
"pg | CopyFrom/CopyTo | copies data from a table and to a table": "5807",
"pg | CountEstimate | works": "17511",
"pg | CountEstimate | works when there are no results": "17511",
"pg | CountEstimate | works with GROUP": "17511",
"pg | CountEstimate | works with GROUP when there are no results": "17511",
"pg | DB nulls | nil ptr inserts non-null value": "5807",
"pg | DB nulls | nil ptr inserts null value": "5807",
"pg | DB nulls | sql.NullInt64 inserts non-null value": "5807",
"pg | DB nulls | sql.NullInt64 inserts null value": "5807",
"pg | DB race | SelectOrInsert without OnConflict is race free": "unknown",
"pg | DB uint64 in struct field | is appended and scanned as int64": "5807",
"pg | DB.Select | selects bytea": "5807",
"pg | DB.Select | selects into embedded struct pointer": "5807",
"pg | HookTest | calls AfterSelect for a slice model": "5807",
"pg | HookTest | calls AfterSelect for a struct model": "5807",
"pg | HookTest | calls BeforeDelete and AfterDelete": "5807",
"pg | HookTest | calls BeforeInsert and AfterInsert": "5807",
"pg | HookTest | calls BeforeUpdate and AfterUpdate": "5807",
"pg | HookTest | does not call BeforeDelete and AfterDelete for nil model": "5807",
"pg | HookTest | does not call BeforeUpdate and AfterUpdate for nil model": "5807",
"pg | Listener | is closed when DB is closed": "41522",
"pg | Listener | listens for notifications": "41522",
"pg | Listener | reconnects on receive error": "41522",
"pg | Listener | returns an error on timeout": "41522",
"pg | Listener | supports concurrent Listen and Receive": "41522",
"pg | soft delete with int column | model Deleted allows to select deleted model": "unknown",
"pg | soft delete with int column | model ForceDelete deletes the model": "unknown",
"pg | soft delete with int column | model soft deletes the model": "unknown",
"pg | soft delete with int column | nil model Deleted allows to select deleted model": "unknown",
"pg | soft delete with int column | nil model ForceDelete deletes the model": "unknown",
"pg | soft delete with int column | nil model soft deletes the model": "unknown",
"pg | soft delete with time column | model Deleted allows to select deleted model": "unknown",
"pg | soft delete with time column | model ForceDelete deletes the model": "unknown",
"pg | soft delete with time column | model soft deletes the model": "unknown",
"pg | soft delete with time column | nil model Deleted allows to select deleted model": "unknown",
"pg | soft delete with time column | nil model ForceDelete deletes the model": "unknown",
"pg | soft delete with time column | nil model soft deletes the model": "unknown",
"v9.ExampleDB_Model_postgresArrayStructTag": "5807",
"v9.TestBigColumn": "5807",
"v9.TestConversion": "32552",
"v9.TestGinkgo": "5807",
Expand Down
9 changes: 9 additions & 0 deletions pkg/cmd/roachtest/orm_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,15 @@ func alterZoneConfigAndClusterSettings(
return err
}

// Enable temp tables for v20.1
if strings.HasPrefix(version, "v20.") {
if _, err := db.ExecContext(
ctx, `SET CLUSTER SETTING sql.defaults.experimental_temporary_tables.enabled = 'true';`,
); err != nil {
return err
}
}

return nil
}

Expand Down
Loading

0 comments on commit 31513b7

Please sign in to comment.