This project is mirrored from https://github.com/cockroachdb/cockroach. Updated .
  1. 28 Mar, 2020 1 commit
    • craig[bot]'s avatar
      Merge #46686 · 0e9f07ae
      craig[bot] authored
      46686: roachtest: adjust alterpk-tpcc roachtest r=rohany a=rohany
      
      This PR bumps the machine type for the alterpk tpcc
      roachtest to a larger instance.
      
      Release justification: non-production code change
      Release note: None
      Co-authored-by: default avatarRohan Yadav <[email protected]>
      0e9f07ae
  2. 27 Mar, 2020 26 commits
    • craig[bot]'s avatar
      Merge #46697 · dacfb7bf
      craig[bot] authored
      46697: build: use golang:1.13-buster for verify archive r=petermattis a=otan
      
      `verify archive` uses an older version of debian, which has an
      older version of cmake (3.7). To fix this, we can upgrade the
      version of debian to buster which has cmake 3.13.
      
      Release justification: non-production code changes
      
      Release note: None
      Co-authored-by: default avatarOliver Tan <[email protected]>
      dacfb7bf
    • craig[bot]'s avatar
      Merge #46692 · 70f12701
      craig[bot] authored
      46692: xform: fix typos in comments r=RaduBerinde a=mgartner
      
      This changes fixes minor typos in comments.
      
      Release note: None
      
      Release justification: non-code change.
      Co-authored-by: default avatarMarcus Gartner <[email protected]>
      70f12701
    • craig[bot]'s avatar
      Merge #46691 #46693 · 1339b168
      craig[bot] authored
      46691: gcjob: stop listening to table descriptor gossip updates r=lucy-zhang a=lucy-zhang
      
      The GC job was previously listening to table descriptor updates and
      potentially refreshing zone configs for its tables/indexes based on that
      trigger. This seems like a relic from the old schema changer that's no
      longer applicable. This PR removes that behavior, since it's sufficient
      to determine and update GC deadlines based on updates to the zone
      configs alone.
      
      Note that we continue to refresh zone configs for all tables/indexes (by
      calling `refreshTables`) upon any zone config update to any table. This
      PR doesn't attempt to change that existing behavior, but in the future
      we'll want some way to cache the TTLs to avoid unnecessary lookups and
      compute the earliest drop deadline based on our cached TTL values.
      
      This PR was motivated by finding a related bug: Previously, we had a
      function `getUpdatedTables` which would filter for tables whose
      descriptors had been updated that the job was responsible for, but this
      could return an empty list. This, when passed to `refreshTables`, would
      produce invalid results and cause the timer duration to be set to
      some garbage value that was too high. This PR eliminates the source of
      that bug.
      
      Release justification: Bug fix for new feature.
      
      Release note (bug fix): Fixed bug (introduced in v20.1.0-beta.3) in the
      new schema change GC job implementation which would cause the execution
      of GC jobs to be incorrectly delayed in the presence of other table
      descriptor updates.
      
      46693: Revert "sql: add support for max/min aggregates on collated strings" r=yuzefovich a=rohany
      
      Reverts cockroachdb/cockroach#46647
      
      As brought up by #46685, the simple change in #46647 is not enough. An investigation into why makes it seem like we need a decent refactor of the overload return type system. Because we type this aggregate with `types.AnyCollatedStringFamily`, we don't end up propagating the correct return type (the collation of the input) through to receivers of the aggregate's output. I think it is too late in the release to attempt such a refactor, so I'm going to revert this PR.
      
      Release justification: Reverts a bug.
      Release note (sql change): Remove the ability to perform min/max aggregates on collated strings.
      Co-authored-by: default avatarLucy Zhang <[email protected]>
      Co-authored-by: default avatarRohan Yadav <[email protected]>
      1339b168
    • Oliver Tan's avatar
      build: use golang:1.13-buster for verify archive · cbfee13b
      Oliver Tan authored
      `verify archive` uses an older version of debian, which has an
      older version of cmake (3.7). To fix this, we can upgrade the
      version of debian to buster which has cmake 3.13.
      
      Release justification: non-production code changes
      
      Release note: None
      cbfee13b
    • craig[bot]'s avatar
      Merge #46345 · 015f51c6
      craig[bot] authored
      46345: changefeedccl,jobs: add behavior on PauseRequest, protect CHANGEFEED data r=spaskob a=ajwerner
      
      This PR comes in several commits. 
      
      1) Unexport a number of internal state transitions from the `*jobs.Job` struct. 
      2) Remove some debugging Printlns
      3) Add an extension to `jobs.Resumer` to control behavior when a pause is requested
      4) Use that extension to install a protected timestamp record when pausing a CHANGEFEED.
      
      Release justification: bug fixes and low-risk updates to new functionality
      Co-authored-by: default avatarAndrew Werner <[email protected]>
      015f51c6
    • craig[bot]'s avatar
      Merge #46631 · d8cef26e
      craig[bot] authored
      46631: kv/kvserver: mv testdata/lock_table/add_discovered out of pkg/storage r=nvanbenschoten a=nvanbenschoten
      
      This testdata file was added in #45601. That skewed with the mass package rename.
      
      Release justification: testing only
      Co-authored-by: default avatarNathan VanBenschoten <[email protected]>
      d8cef26e
    • Rohan Yadav's avatar
      Revert "sql: add support for max/min aggregates on collated strings" · 47f49963
      Rohan Yadav authored
      Reverts #46647
      
      As brought up by #46685, the simple change in #46647 is not enough. An
      investigation into why makes it seem like we need a decent refactor of
      the overload return type system. Because we type this aggregate with
      types.AnyCollatedStringFamily, we don't end up propagating the correct
      return type (the collation of the input) through to receivers of the
      aggregate's output. I think it is too late in the release to attempt
      such a refactor, so I'm going to revert this PR.
      
      Release justification: Reverts a bug.
      Release note (sql change): Remove the ability to perform min/max
      aggregates on collated strings.
      47f49963
    • craig[bot]'s avatar
      Merge #46676 · 3929c6b5
      craig[bot] authored
      46676: opt: don't elide scans that have locking clauses r=RaduBerinde a=RaduBerinde
      
      In this change we mark Scans as side-effecting when they have a locking clause.
      This allows patterns like using WITH to lock some rows that are otherwise not
      needed by the current statement.
      
      Release note (bug fix): scans that lock rows (via FOR UPDATE) are no longer
      elided when the results are unused.
      
      Release justification: fix for new functionality.
      Co-authored-by: default avatarRadu Berinde <[email protected]>
      3929c6b5
    • Marcus Gartner's avatar
      xform: fix typos in comments · 81adc486
      Marcus Gartner authored
      This changes fixes minor typos in comments.
      
      Release note: None
      81adc486
    • Lucy Zhang's avatar
      gcjob: stop listening to table descriptor gossip updates · cf7f4237
      Lucy Zhang authored
      The GC job was previously listening to table descriptor updates and
      potentially refreshing zone configs for its tables/indexes based on that
      trigger. This seems like a relic from the old schema changer that's no
      longer applicable. This PR removes that behavior, since it's sufficient
      to determine and update GC deadlines based on updates to the zone
      configs alone.
      
      Note that we continue to refresh zone configs for all tables/indexes (by
      calling `refreshTables`) upon any zone config update to any table. This
      PR doesn't attempt to change that existing behavior, but in the future
      we'll want some way to cache the TTLs to avoid unnecessary lookups and
      compute the earliest drop deadline based on our cached TTL values.
      
      This PR was motivated by finding a related bug: Previously, we had a
      function `getUpdatedTables` which would filter for tables whose
      descriptors had been updated that the job was responsible for, but this
      could return an empty list. This, when passed to `refreshTables`, would
      produce invalid results and cause the timer duration to be set to
      some garbage value that was too high. This PR eliminates the source of
      that bug.
      
      Release justification: Bug fix for new feature.
      
      Release note (bug fix): Fixed bug (introduced in v20.1.0-beta.3) in the
      new schema change GC job implementation which would cause the execution
      of GC jobs to be incorrectly delayed in the presence of other table
      descriptor updates.
      cf7f4237
    • Rohan Yadav's avatar
      roachtest: adjust alterpk-tpcc roachtest · 33292922
      Rohan Yadav authored
      This PR bumps the machine type for the alterpk tpcc
      roachtest to a larger instance.
      
      Release justification: non-production code change
      Release note: None
      33292922
    • craig[bot]'s avatar
      Merge #46678 · 31bce929
      craig[bot] authored
      46678: sqlbase: unimplemented error for fk on comp cols r=jordanlewis a=jordanlewis
      
      Release note: None
      Release justification: low risk error message change
      Co-authored-by: default avatarJordan Lewis <[email protected]>
      31bce929
    • craig[bot]'s avatar
      Merge #46583 #46587 #46595 #46668 #46673 · 515406a3
      craig[bot] authored
      46583: workload: enhance querybench r=yuzefovich a=yuzefovich
      
      Release justification: non-production code changes.
      
      `querybench` workload has been enhanced to support queries that consist
      of multiple statements that are present on a single line. Previously,
      the workload would fail on such queries because it attempts to `Prepare`
      the whole line which would error out. Now we're still attempting to
      prepare the whole line, but if that fails, we will store plain query and
      will be executing it using `DB.Query` rather that `Stmt.Query`.
      
      Fixes: #46547.
      Fixes: #46607.
      
      Release note: None
      
      46587: colexec: optimize resetting of buffered groups in merge joiner r=yuzefovich a=yuzefovich
      
      **colexec: fix resetting of buffered groups**
      
      Release justification: bug fixes and low-risk updates to new
      functionality.
      
      Previously, whenever we needed to reset the buffered groups, we would
      close the spilling queue and would create a new one when needed. This is
      an overkill since we could simply reset the spilling queues that we have
      which reduces amount of allocations and improves the performance.
      
      Addresses: #46502.
      
      Release note: None
      
      **logictest: make results of queries in vectorize test deterministic**
      
      Release justification: non-production code changes.
      
      Several queries in `vectorize` logic test could have produced different
      results, and this is now fixed.
      
      Fixes: #46630.
      
      Release note: None
      
      46595: colexec: further optimize hash aggregator r=yuzefovich a=yuzefovich
      
      Release justification: low-risk update to new functionality (it is
      low-risk because it does not change anything fundamentally, rather only
      improves the way we handle allocations and clear an internal state).
      
      This commit optimizes the hash aggregator relationship with selection
      vectors. Previously, we were maintaining a map from hash code (`uint64`)
      to a slice of ints, and this would result in creating a new int slice
      for every hash code that the hash aggregator ever encounters during its
      run. However, we're processing atmost (about) `batchTupleLimit` tuples
      at once, so at most we can have the same number of different hash codes.
      This observation allows us to have constant number of int slices. To
      accommodate this, we introducing a map from hash code to the "slot" in
      `[][]int`, and the map is maintained to contain hash codes that we need
      to process. Once the hash code has been processed, the entry is deleted.
      This way both the map and the number of int slices stays constant
      throughout the run of the hash aggregator.
      
      Also this commit refactors `makeAggregateFuncs` to separate out the
      creation of output types (this has some impact on performance of hash
      aggregator which makes aggregate functions for every group).
      
      Release note: None
      
      46668: cli,build: remove backtrace support r=yuzefovich a=petermattis
      
      Support for Backtrace Labs out of process tracers (i.e. ptrace) has been
      disabled since Nov 2016. We never found this integration useful. It is
      past time to remove it.
      
      Release justification: removal of unused code
      
      Release note: None
      
      46673: build: do not fail RocksDB build on compiler warnings r=yuzefovich a=petermattis
      
      Disable `-Werror` for the RocksDB build which has recently started
      complaining about a missing exception specification in a jemalloc header
      with the newest version of Xcode.
      
      Release justification: low risk change to remove developer build
      irritation. Should be a no-op for production builds.
      
      Release note: None
      Co-authored-by: default avatarYahor Yuzefovich <[email protected]>
      Co-authored-by: default avatarPeter Mattis <[email protected]>
      515406a3
    • Yahor Yuzefovich's avatar
      workload: enhance querybench · f9a536c5
      Yahor Yuzefovich authored
      Release justification: non-production code changes.
      
      `querybench` workload has been enhanced to support queries that consist
      of multiple statements that are present on a single line. Previously,
      the workload would fail on such queries because it attempts to `Prepare`
      the whole line which would error out. Now we're still attempting to
      prepare the whole line, but if that fails, we will store plain query and
      will be executing it using `DB.Query` rather that `Stmt.Query`.
      
      Release note: None
      f9a536c5
    • craig[bot]'s avatar
      Merge #46669 · c395c442
      craig[bot] authored
      46669: colexec: improve test coverage for joiners r=jordanlewis a=jordanlewis
      
      All Int64-specific merge join and hash join test cases are now
      duplicated for Decimals and Bytes types.
      
      Release note: None
      Release justification: test-only change
      Co-authored-by: default avatarJordan Lewis <[email protected]>
      c395c442
    • Jordan Lewis's avatar
      colexec: improve test coverage for joiners · b74c4e4d
      Jordan Lewis authored
      All Int64-specific merge join and hash join test cases are now
      duplicated for Decimals and Bytes types.
      
      Release note: None
      Release justification: test-only change
      b74c4e4d
    • Radu Berinde's avatar
      opt: don't elide scans that have locking clauses · 2f393c15
      Radu Berinde authored
      In this change we mark Scans as side-effecting when they have a locking clause.
      This allows patterns like using WITH to lock some rows that are otherwise not
      needed by the current statement.
      
      Release note (bug fix): scans that lock rows (via FOR UPDATE) are no longer
      elided when the results are unused.
      
      Release justification: fix for new functionality.
      2f393c15
    • craig[bot]'s avatar
      Merge #46643 · 8f793a0d
      craig[bot] authored
      46643: opt: better error message for unsupported UNION variant of recursive CTEs r=RaduBerinde a=RaduBerinde
      
      Postgres supports a variant of recursive CTEs that uses UNION instead
      of UNION ALL. We don't support it as of yet; this commit improves the
      error returned in this case.
      
      Fixes #46378.
      
      Release note: None
      
      Release justification: low risk change to new functionality.
      Co-authored-by: default avatarRadu Berinde <[email protected]>
      8f793a0d
    • Peter Mattis's avatar
      build: do not fail RocksDB build on compiler warnings · 7f611599
      Peter Mattis authored
      Disable `-Werror` for the RocksDB build which has recently started
      complaining about a missing exception specification in a jemalloc header
      with the newest version of Xcode.
      
      Release justification: low risk change to remove developer build
      irritation. Should be a no-op for production builds.
      
      Release note: None
      7f611599
    • Jordan Lewis's avatar
      sqlbase: unimplemented error for fk on comp cols · 3edd193e
      Jordan Lewis authored
      Release note: None
      Release justification: low risk error message change
      3edd193e
    • Peter Mattis's avatar
      cli,build: remove backtrace support · ffe79b12
      Peter Mattis authored
      Support for Backtrace Labs out of process tracers (i.e. ptrace) has been
      disabled since Nov 2016. We never found this integration useful. It is
      past time to remove it.
      
      Release justification: removal of unused code
      
      Release note: None
      ffe79b12
    • craig[bot]'s avatar
      Merge #46203 · 27b79e47
      craig[bot] authored
      46203: colexec: add Closers to NewColOperatorResult r=yuzefovich a=asubiotto
      
      Release justification: bug fixes and low-risk updates to new functionality.
      External operators would not be Closed if not drained completely, which is not
      the case with a downstream limit. The flow would clean up disk space/file
      descriptors, but this commit makes it so that Close is called on these
      operators in cases where the operator is not fully drained.
      
      These are only external storage operators that need to be explicitly told to
      close when not drained of input (e.g. due to a downstream limit). When creating
      a component, it can now be added to result.ToClose, which will add it to the
      first downstream outbox or materializer (there must be at least one in the
      flow) to close either on graceful or non-graceful termination.
      
      Release note (bug fix): resources including disk space and file descriptors were
      only being cleaned up at the end of a query's execution. This now happens as
      early as possible.
      
      Closes #44652 
      Co-authored-by: default avatarAlfonso Subiotto Marques <[email protected]>
      27b79e47
    • Alfonso Subiotto Marques's avatar
      colexec: add Closers to NewColOperatorResult · 4ed919fb
      Alfonso Subiotto Marques authored
      Release justification: bug fixes and low-risk updates to new functionality.
      External operators would not be Closed if not drained completely, which is not
      the case with a downstream limit. The flow would clean up disk space/file
      descriptors, but this commit makes it so that Close is called on these
      operators in cases where the operator is not fully drained.
      
      These are only external storage operators that need to be explicitly told to
      close when not drained of input (e.g. due to a downstream limit). When creating
      a component, it can now be added to result.ToClose, which will add it to the
      first downstream outbox or materializer (there must be at least one in the
      flow) to close either on graceful or non-graceful termination.
      
      Release note: None (no observable impact)
      4ed919fb
    • craig[bot]'s avatar
      Merge #46640 · c0855e9f
      craig[bot] authored
      46640: ui: (fix) OOM exception on ui-test build r=nathanstilwell a=koorosh
      
      It is one more attempt to fix OOM issue on ui test runs.
      Previous fixes were based mainly on suggestion that the
      root cause of issue is source maps generated during builds
      by karma.
      
      Actually the problem was in webpack and the way it preprocess
      files by karma `preprocessors: [...]`.
      Before we provided a bunch of files (source and test files) and
      webpack processed each matched file separately what caused
      memory consumption overhead.
      
      Current solution:
      - removes source files from karma configuration entirely.
      Required sources are already imported in test files so they
      will be included as well.
      - added `tests-loader` file as a single entry point for all
      test files. It allows us to provide and preprocess one file
      with all required test file at once.
      
      Current fix is based on found work around:
      https://github.com/karma-runner/karma/issues/1868#issuecomment-296071567
      
      Release note: None
      
      Release justification: non-production code changes
      Co-authored-by: default avatarAndrii Vorobiov <[email protected]>
      c0855e9f
    • Radu Berinde's avatar
      opt: better error message for unsupported UNION variant of recursive CTEs · 407cb4c4
      Radu Berinde authored
      Postgres supports a variant of recursive CTEs that uses UNION instead
      of UNION ALL. We don't support it as of yet; this commit improves the
      error returned in this case.
      
      Fixes #46378.
      
      Release note: None
      
      Release justification: low risk change to new functionality.
      407cb4c4
    • craig[bot]'s avatar
      Merge #46623 · 22599ff5
      craig[bot] authored
      46623: sql: add 192auto to the hint for vectorize session variable r=yuzefovich a=yuzefovich
      
      Release justification: bug fixes and low-risk updates to new
      functionality (only hint change).
      
      `192auto` was forgotten to be added to the hint for `vectorize` session
      variable.
      
      Release note: None
      Co-authored-by: default avatarYahor Yuzefovich <[email protected]>
      22599ff5
  3. 26 Mar, 2020 13 commits
    • craig[bot]'s avatar
      Merge #46619 · dfee706f
      craig[bot] authored
      46619: build: upgrade to go 1.13.9 and cmake 3.17.0 r=petermattis a=petermattis
      
      Upgrade from go 1.13.5 to go 1.13.9 which picks up a number of security
      fixes.
      
      Upgrade cmake from 3.5.1 to 3.17.0. The newer cmake is needed by libgeos
      which the geospatial folks want to use. 3.5.1 is very out of date.
      
      Fixes cockroachdb/dev-inf#60
      
      Release note (build change): CockroachDB is now built against go1.13.19.
      
      Release justification: low risk, high benefit change to use the latest
      minor release of go1.13 in order to pick up security fixes.
      Co-authored-by: default avatarPeter Mattis <[email protected]>
      dfee706f
    • craig[bot]'s avatar
      Merge #46552 · fdc568c7
      craig[bot] authored
      46552: opt: fix histogram type assertion error r=rytaft a=rytaft
      
      It is possible in certain edge cases that we need to filter a histogram
      using a constraint with a different data type. For example, we may need
      to filter a histogram of timestamps with a constraint of type date.
      
      Prior to this commit, filtering a histogram with mismatched types
      would cause an assertion error. This commit fixes the issue by avoiding
      the calculations requiring a type assertion if the types don't match.
      
      In order to easily perform this check, this commit includes a small
      refactoring of the `getFilteredBucket` function in `histogram.go`.
      Specifically, it pulls out the code for calculating bucket range sizes
      and for determining whether a data type is discrete into two separate
      functions.
      
      Fixes #46217
      
      Release justification: This change is a low risk, high benefit change
      to existing functionality.
      
      Release note (bug fix): Fixed an internal error that could happen
      during planning when a column with a histogram was filtered with a
      predicate of a different data type.
      Co-authored-by: default avatarRebecca Taft <[email protected]>
      fdc568c7
    • Nathan VanBenschoten's avatar
      kv/kvserver: mv testdata/lock_table/add_discovered out of pkg/storage · a4744906
      Nathan VanBenschoten authored
      This testdata file was added in #45601. That skewed with the package
      rename.
      
      Release justification: testing only
      a4744906
    • craig[bot]'s avatar
      Merge #46647 · fb7ae834
      craig[bot] authored
      46647: sql: add support for max/min aggregates on collated strings r=yuzefovich a=rohany
      
      Fixes #45846.
      
      Release justification: low risk update to existing functionality
      Release note (sql change): The max/min aggregates now work on collated
      strings.
      Co-authored-by: default avatarRohan Yadav <[email protected]>
      fb7ae834
    • craig[bot]'s avatar
      Merge #46534 · f02101c1
      craig[bot] authored
      46534: sql: rename EXPLAIN BUNDLE to EXPLAIN ANALYZE (DEBUG) r=RaduBerinde a=RaduBerinde
      
      #### sql: clean up Explain AST
      
      This change cleans up tree.Explain by parsing the options upfront and storing
      the ExplainOptions directly. This change will make it easier to rename EXPLAIN
      BUNDLE.
      
      Release note: None
      
      #### sql: rename EXPLAIN BUNDLE to EXPLAIN ANALYZE (DEBUG)
      
      This change renames the EXPLAIN BUNDLE statement to
      EXPLAIN ANALYZE (DEBUG).
      We agreed on this syntax to avoid adding a new top-level keyword, and because
      the statement has similar behavior with ANALYZE in that it executes the query.
      
      The plan is to fold this back (for 20.2) into `EXPLAIN ANLYZE` which will be
      changed to return more information than just a diagram.
      
      Release note (sql change): Renamed EXPLAIN BUNDLE statement to
      EXPLAIN ANALYZE (DEBUG).
      
      Release justification: improvement in new functionality.
      Co-authored-by: default avatarRadu Berinde <[email protected]>
      f02101c1
    • Rohan Yadav's avatar
      sql: add support for max/min aggregates on collated strings · 9b845716
      Rohan Yadav authored
      Fixes #45846.
      
      Release justification: low risk update to existing functionality
      Release note (sql change): The max/min aggregates now work on collated
      strings.
      9b845716
    • Andrii Vorobiov's avatar
      ui: (fix) OOM exception on ui-test build · b982643b
      Andrii Vorobiov authored
      It is one more attempt to fix OOM issue on ui test runs.
      Previous fixes were based mainly on suggestion that the
      root cause of issue is source maps generated during builds
      by karma.
      
      Actually the problem was in webpack and the way it preprocess
      files by karma `preprocessors: [...]`.
      Before we provided a bunch of files (source and test files) and
      webpack processed each matched file separately what caused
      memory consumption overhead.
      
      Current solution:
      - removes source files from karma configuration entirely.
      Required sources are already imported in test files so they
      will be included as well.
      - added `tests-loader` file as a single entry point for all
      test files. It allows us to provide and preprocess one file
      with all required test file at once.
      
      Current fix is based on found work around:
      https://github.com/karma-runner/karma/issues/1868#issuecomment-296071567
      
      Release note: None
      
      Release justification: non-production code changes
      b982643b
    • craig[bot]'s avatar
      Merge #46624 · b5abb6e7
      craig[bot] authored
      46624: build: require go 1.13 r=RaduBerinde a=RaduBerinde
      
      Some parts of the tree no longer build with go1.12; update the
      go-version-check script to not allow it anymore.
      
      Release note: None
      
      Release justification: Not a code change.
      Co-authored-by: default avatarRadu Berinde <[email protected]>
      b5abb6e7
    • craig[bot]'s avatar
      Merge #46245 #46334 #46543 #46566 #46634 · 03b0c591
      craig[bot] authored
      46245: README: add slack to README and spruce things up r=irfansharif a=jess-edwards
      
      Adds slack channel under the Support section in the read.me
      
      Can someone help me update the logo? I'm not sure where to upload it.
      
      Release justification: Non-production change.
      Release note: None
      
      46334: sql: make truncate take a constant number of round trips per table r=rohany a=rohany
      
      Fixes #46029.
      
      Release justification: low risk improvement to current functionality
      Release note (sql change): This PR fixes a performance bug where
      truncate would take `2*num columns + 2*num` indexes round trips.
      This could lead to slow truncate performance in distributed clusters.
      
      46543: colexec: fix interaction between projectingBatch and ArrowBatchConverter r=yuzefovich a=yuzefovich
      
      Release justification: bug fixes and low-risk updates to new
      functionality.
      
      With our recent work, `simpleProjectOp` relies on creating a separate
      `projectingBatch` for each "new" batch it sees (where "new" is tracked
      by the pointer address). This works ok, but the interaction with
      ArrowBatchConverter has been messed up - the converter `Reset`s the
      batch which truncates its type schema. As a result, we end up in
      a situation where `projectingBatch` that wraps the batch created in the
      converter thinks that there are more columns than `MemBatch.b` actually
      contains after the truncation which can lead to an internal error. This
      problem is now fixed by introducing another variation of `Reset` method
      (`ResetNoTruncation`) that doesn't truncate the schema. Only
      ArrowBatchConverter is using this method.
      
      Fixes: #46533.
      
      Release note: None (this is a follow-up fix to a PR that has been merged
      three weeks ago with a release note)
      
      46566: colexec: add telemetry for changing the vectorized cluster setting r=yuzefovich a=asubiotto
      
      Release justification: low-risk update to new functionality
      
      Release note: None (no user-visible changes)
      
      46634: cli/zip: fix the naming of error reports r=ajwerner a=knz
      
      Fixes #46633.
      
      If one of the `debug zip` requests fails with an error, it attempts to
      populate a text file with the text of the error message.
      
      Previously, the code would name the text file using the same name as
      one of the directories at the same level, which renders the resulting
      zip file invalid. This patch fixes that.
      
      Release justification: fixes for high-priority or high-severity bugs
      in existing functionality
      
      Release note (cli change): `cockroach debug zip` now avoids creating
      invalid zip files if some of its requests encounter an error.
      Co-authored-by: default avatarjess-edwards <[email protected]>
      Co-authored-by: default avatarirfan sharif <[email protected]>
      Co-authored-by: default avatarRohan Yadav <[email protected]>
      Co-authored-by: default avatarYahor Yuzefovich <[email protected]>
      Co-authored-by: default avatarAlfonso Subiotto Marques <[email protected]>
      Co-authored-by: default avatarRaphael 'kena' Poss <[email protected]>
      03b0c591
    • Yahor Yuzefovich's avatar
      colexec: fix interaction between projectingBatch and ArrowBatchConverter · b337413a
      Yahor Yuzefovich authored
      Release justification: bug fixes and low-risk updates to new
      functionality.
      
      With our recent work, `simpleProjectOp` relies on creating a separate
      `projectingBatch` for each "new" batch it sees (where "new" is tracked
      by the pointer address). This works ok, but the interaction with
      ArrowBatchConverter has been messed up - the converter `Reset`s the
      batch which truncates its type schema. As a result, we end up in
      a situation where `projectingBatch` that wraps the batch created in the
      converter thinks that there are more columns than `MemBatch.b` actually
      contains after the truncation which can lead to an internal error. This
      problem is now fixed by introducing another variation of `Reset` method
      (`ResetNoTruncation`) that doesn't truncate the schema. Only
      ArrowBatchConverter is using this method.
      
      Release note: None (this is a follow-up fix to a PR that has been merged
      three weeks ago with a release note)
      b337413a
    • Yahor Yuzefovich's avatar
      sql: add 192auto to the hint for vectorize session variable · e8f6d2c2
      Yahor Yuzefovich authored
      Release justification: bug fixes and low-risk updates to new
      functionality (only hint change).
      
      `192auto` was forgotten to be added to the hint for `vectorize` session
      variable.
      
      Release note: None
      e8f6d2c2
    • Yahor Yuzefovich's avatar
      colexec: further optimize hash aggregator · 60a38465
      Yahor Yuzefovich authored
      Release justification: low-risk update to new functionality (it is
      low-risk because it does not change anything fundamentally, rather only
      improves the way we handle allocations and clear an internal state).
      
      This commit optimizes the hash aggregator relationship with selection
      vectors. Previously, we were maintaining a map from hash code (`uint64`)
      to a slice of ints, and this would result in creating a new int slice
      for every hash code that the hash aggregator ever encounters during its
      run. However, we're processing atmost (about) `batchTupleLimit` tuples
      at once, so at most we can have the same number of different hash codes.
      This observation allows us to have constant number of int slices. To
      accommodate this, we introducing a map from hash code to the "slot" in
      `[][]int`, and the map is maintained to contain hash codes that we need
      to process. Once the hash code has been processed, the entry is deleted.
      This way both the map and the number of int slices stays constant
      throughout the run of the hash aggregator.
      
      Also this commit refactors `makeAggregateFuncs` to separate out the
      creation of output types (this has some impact on performance of hash
      aggregator which makes aggregate functions for every group).
      
      Release note: None
      60a38465
    • craig[bot]'s avatar
      Merge #46621 · 5a8ab238
      craig[bot] authored
      46621: delegate: fix SHOW INDEXES ... WITH COMMENT showing extraneous data r=rohany a=otan
      
      Resolves https://github.com/cockroachdb/cockroach/issues/46333
      
      Release justification: low risk, high benefit changes to existing
      functionality
      Release note (bug fix): Previously, SHOW INDEXES ... WITH COMMENT would
      show duplicate rows for certain tables if indexes were identically
      named. This has been fixed.
      Co-authored-by: default avatarOliver Tan <[email protected]>
      5a8ab238