Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/cockroachdb/cockroach. Pull mirroring updated .
  1. Jan 11, 2024
  2. Jan 10, 2024
  3. Jan 09, 2024
  4. Jan 08, 2024
    • Yahor Yuzefovich's avatar
      Merge pull request #117501 from cockroachdb/blathers/backport-release-23.1.14-rc-117367 · ceb70edf
      Yahor Yuzefovich authored
      release-23.1.14-rc: sql/stats: deflake TestStatsAreDeletedForDroppedTables
      ceb70edf
    • Marylia Gutierrez's avatar
      Merge pull request #117497 from maryliag/backport23.1.14-rc-116976 · b9b41077
      Marylia Gutierrez authored
      release-23.1.14-rc: server: fix total latency time on sql stats call
      b9b41077
    • maryliag's avatar
      server: fix total latency time on sql stats call · a132eec2
      maryliag authored
      For the top activity tables, we have a column `execution_total_cluster_seconds`
      with the total latency of all executions of that period.
      This value is important because the top activity table have
      up to 500 rows per aggregated timestamp, so if we add all
      latencies from it, we won't have the total, only the total of the top.
      We then have a column that has that total of that hour which is
      based on the main table.
      Previously, when making a request to the top activity table
      we were returning only of of those values as the total, which
      works as expected if your select is in a single aggregation period.
      The majority of requests won't be this way, so we need to add the values
      from all aggregated period selects.
      
      This commit update the query for the total select to get
      one value from each aggregated_ts and then adding those.
      
      Part Of CRDB-34884
      
      Release note (bug fix): Fix value used for the total runtime on sql stats,
      which was using the wrong value previously, causing the UI to display values
      with more than 100%.
      a132eec2
  5. Jan 04, 2024
  6. Jan 02, 2024
  7. Dec 28, 2023
  8. Dec 27, 2023
  9. Dec 26, 2023
  10. Dec 21, 2023
  11. Dec 20, 2023
  12. Dec 19, 2023
    • Austen's avatar
      Merge pull request #115662 from cockroachdb/blathers/backport-release-23.1-114620 · aca5893f
      Austen authored
      release-23.1: kvserver: skip repl queue rebalance under deadlock
      aca5893f
    • Renato Costa's avatar
    • Rafi Shamim's avatar
      Merge pull request #116720 from rafiss/backport23.1-116561 · 8505e661
      Rafi Shamim authored
      release-23.1: sql: make txnCounter for BEGIN logs more understandable
      8505e661
    • Alex Barganier's avatar
      Merge pull request #114747 from abarganier/backport23.1-114273 · 887ccf53
      Alex Barganier authored
      release-23.1: pkg/util/aggmetric: tick histogram windows in AggHistogram
      887ccf53
    • Alex Barganier's avatar
      pkg/util/aggmetric: tick histogram windows in AggHistogram · 9cb7f99c
      Alex Barganier authored
      AggHistograms are wrappers around the histogram implementations found in
      pkg/util/metric. Internally, Histogram implementations within
      pkg/util/metric maintain histogram windows to calculate quantiles at
      each scrape by CockroachDB's TSDB, instead of storing every single
      histogram bucket. These windows are rotated periodically, where the
      current window becomes the previous window, and the current window is
      then set to a new histogram. This allows us to diff the two windows, and
      internally, pkg/util/metric has "ticking" functionality which is
      responsible for rotating these histogram windows.
      
      Unfortunately, since `pkg/util/metric/aggmetric` is in a separate
      package, somehow this "ticking"/rotating of histogram windows was never
      implemented into the AggHistogram. Because of this, it's likely that
      metrics powered by AggHistogram have been broken since its inception
      within CockroachDB's internal TSDB (but work fine in Prometheus).
      
      Previous patches did some work to expose this ticking library to
      AggHistogram, and this patch implements it.
      
      In this patch, we make it so AggHistogram ticks/rotates histogram
      windows, similar to how the other Histogram library does it. Since
      AggHistograms have child histograms, this means that the rotation of all
      histograms for both parent and children need to be done atomically. We
      implement this by providing the AggHistogram its own tick.Ticker, where
      the onTick function holds a RWMutex shared by the parent & all its
      children and rotates the histograms for all.
      
      With this in place, histogram windows are properly rotated for
      AggHistograms. Future work will merge `pkg/util/metric/aggmetric` into
      `pkg/util/metric`, after which we can once again make all this ticking
      functionality private to the metrics package.
      
      Release note (bug fix): Previously, all `AggHistogram`-powered metrics
      were not reporting quantiles properly in DB Console. The list of
      affected metrics is:
      
      - changefeed.message_size_hist
      - changefeed.parallel_io_queue_nanos
      - changefeed.sink_batch_hist_nanos
      - changefeed.flush_hist_nanos
      - changefeed.commit_latency
      - changefeed.admit_latency
      - jobs.row_level_ttl.span_total_duration
      - jobs.row_level_ttl.select_duration
      - jobs.row_level_ttl.delete_duration
      
      This patch fixes the histograms so that the quantiles in DB Console are
      reported correctly.
      
      Please note: these histograms were only broken in the DB Console metrics
      features, but were **not** broken in the Prometheus-compatible endpoint,
      `/_status/vars`.
      9cb7f99c
    • Alex Barganier's avatar
      pkg/util/metric: expand IHistogram to include tick.Periodic interface · df3c82fa
      Alex Barganier authored
      Ticking functionality is generally something that we should consider
      internal to the histogram libraries. It's not ideal to expose any sort
      of tick functionality as part of the Histogram's public API. However,
      ticking functionality was never implemented in aggmetric.AggHistogram.
      In order to fix the bug, the AggHistogram needs to be able to tick the
      underlying histogram, as well as the underlying histogram for all its
      children, atomically.
      
      Unfortunately, since the aggmetrics exist in a separate package, there
      are only two ways to accomplish this:
      1. Merge pkg/util/aggmetric into pkg/util/metric, so that
         package-private interfaces can be shared.
      2. Pollute the public API of IHistogram with functions that enable
         external clients to force a tick of the histogram.
      
      [1] is the right approach, but is a heavyweight change that's not easily
      backportable. [2] is not ideal, but impacts a much smaller surface area,
      meaning it's easier to backport.
      
      Since the upcoming AggHistogram fix needs to be backported, this patch
      sets us up with [2]. We will backport a fix that impacts the minimum
      surface area, and a follow up patch will implement [1] on master so we
      have the desired approach long-term.
      
      metric.Histogram and metric.HdrHistogram are updated with
      implementations for the new interface functions, which simply invoke the
      equivalent functions on the underlying tick.Ticker.
      
      Release note: none
      df3c82fa
    • Alex Barganier's avatar
      pkg/util/metric: move tickHelper to its own package · 731b4457
      Alex Barganier authored
      It's come to light that the `AggHistogram` from `pkg/util/metric/aggmetric`
      does not properly tick histogram windows. This needs to be fixed.
      
      We should make use of the tickHelper, but it's not exported from
      `pkg/util/metric`. This patch sets up future work to implement ticking
      by moving the tickHelper and associated "ticking" logic into its
      own package. This will make it easily shared between the metric
      and aggmetric packages.
      
      Exposing the ticker is not a desirable approach. Ideally, it should be
      internal to pkg/util/metric. Unfortunately, AggHistogram lives in a
      separate package and will require a ticker. The best approach here would
      be to merge pkg/util/aggmetric into pkg/util/metric, so we could keep
      the ticking stuff package-private while also giving AggHistogram access
      to it. However, these fixes need to be backportable, so we will do the
      thing that involves the minimum surface area first, and follow up with
      the merged package approach.
      
      Release note: none
      731b4457
    • Rafi Shamim's avatar
      sql: add telemetry for mixed DDL/DML transactions · 99e354a3
      Rafi Shamim authored
      This patch adds feature counter telemetry for explicit transactions that
      have schema changes. We track is a transaction has DDL only or a mixture
      of DDL and DML, and if it succeeded or failed.
      
      Release note: None
      99e354a3
    • Rafi Shamim's avatar
      sql: make txnCounter for BEGIN logs more understandable · 8c8058e2
      Rafi Shamim authored
      Previously, the txnCounter would not be incremented until after the
      transaction began. This made it hard to read the logs and understand
      which transaction a BEGIN statement was a part of.
      
      Now, the txnCounter is incremented just before the time of executing any
      statement in the NoTxn state - all implicit and explicit transactions
      must be started this way.
      
      Release note: None
      8c8058e2
    • Rafi Shamim's avatar
      Merge pull request #116674 from rafiss/backport23.1-116549 · 48d729c8
      Rafi Shamim authored
      release-23.1: sql,opt: don't validate AOST during session migration
      48d729c8
  13. Dec 18, 2023
  14. Dec 17, 2023
Loading