version_ancestor_overrides.py 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239
  1. # Copyright Materialize, Inc. and contributors. All rights reserved.
  2. #
  3. # Use of this software is governed by the Business Source License
  4. # included in the LICENSE file at the root of this repository.
  5. #
  6. # As of the Change Date specified in that file, in accordance with
  7. # the Business Source License, use of this software will be governed
  8. # by the Apache License, Version 2.0.
  9. from __future__ import annotations
  10. from typing import Any
  11. from materialize.mz_version import MzVersion
  12. def get_ancestor_overrides_for_performance_regressions(
  13. scenario_class: type[Any], scale: str | None
  14. ) -> dict[str, MzVersion]:
  15. """
  16. Git revisions that are based on commits listed as keys require at least the version specified in the value.
  17. Note that specified versions do not necessarily need to be already published.
  18. Commits must be ordered descending by their date.
  19. """
  20. scenario_class_name = scenario_class.__name__
  21. min_ancestor_mz_version_per_commit = dict()
  22. if scenario_class_name in ("CrossJoin", "AccumulateReductions"):
  23. # PR#31501 (Remove ChunkedStack and related) increases latency for inserts
  24. min_ancestor_mz_version_per_commit[
  25. "e91f9d5e47f5dddf1d5d1a3afa3c27907bdbb0a7"
  26. ] = MzVersion.parse_mz("v0.134.0")
  27. if scenario_class_name == "ManySmallInserts":
  28. # PR#31309 ([adapter] don't block on builtin table write in Session creation) increases latency for inserts
  29. min_ancestor_mz_version_per_commit[
  30. "e8c42c65afb7acd55eb7e530a92c89a9165f2e33"
  31. ] = MzVersion.parse_mz("v0.133.0")
  32. if scenario_class_name == "SwapSchema":
  33. # PR#30883 (Columnar in logging dataflows) increases Mz memory usage
  34. min_ancestor_mz_version_per_commit[
  35. "a077232ffcb76ef7498da7637fbc9e80aa88765c"
  36. ] = MzVersion.parse_mz("v0.131.0")
  37. if scenario_class_name == "FastPathOrderByLimit":
  38. # PR#30872 (rust: Upgrade to 1.83.0) increases wallclock
  39. min_ancestor_mz_version_per_commit[
  40. "74ebdd68dd2e9ec860837d52866ab9db61a0a49e"
  41. ] = MzVersion.parse_mz("v0.129.0")
  42. if scenario_class_name == "OptbenchTPCHQ01":
  43. # PR#30806 ([optimizer] report per-transform metrics) increases wallclock
  44. min_ancestor_mz_version_per_commit[
  45. "a5355b2e89fedef9f7a04a96b737f7434a8e3f62"
  46. ] = MzVersion.parse_mz("v0.128.0")
  47. if scenario_class_name in ("KafkaUpsert", "KafkaUpsertUnique", "ParallelIngestion"):
  48. # PR#30617 (storage/kafka: use separate consumer for metadata probing)
  49. # adds 1s of delay to Kafka source startup
  50. min_ancestor_mz_version_per_commit[
  51. "9f7b634e6824f73d0effcdfa86c2b8b1642a4784"
  52. ] = MzVersion.parse_mz("v0.127.0")
  53. if scenario_class_name == "InsertMultiRow":
  54. # PR#30622 (Refactor how we run FoldConstants) increases wallclock
  55. min_ancestor_mz_version_per_commit[
  56. "a558d6bdc4b29abf79457eaba52914a0d6c805b7"
  57. ] = MzVersion.parse_mz("v0.127.0")
  58. if "OptbenchTPCH" in scenario_class_name:
  59. # PR#30602 (Replace ColumnKnowledge with EquivalencePropagation) increases wallclock
  60. min_ancestor_mz_version_per_commit[
  61. "1bd45336f8335b3487153beb7ce57f6391a7cf9c"
  62. ] = MzVersion.parse_mz("v0.126.0")
  63. if "OptbenchTPCH" in scenario_class_name:
  64. # PR#30506 (Remove NonNullable transform) increases wallclock
  65. min_ancestor_mz_version_per_commit[
  66. "6981cb35f6a64748293867beb67e74b804f9e723"
  67. ] = MzVersion.parse_mz("v0.126.0")
  68. if scenario_class_name == "KafkaUpsertUnique":
  69. # PR#29718 (storage: continual feedback upsert operator) increases CPU and memory
  70. min_ancestor_mz_version_per_commit[
  71. "b16b6a2c71f6e52adcbe37988cb262c15074a63f"
  72. ] = MzVersion.parse_mz("v0.125.0")
  73. if scenario_class_name in (
  74. "SmallClusters",
  75. "AccumulateReductions",
  76. "CreateIndex",
  77. "ManySmallUpdates",
  78. "FastPathOrderByLimit",
  79. "FastPathFilterIndex",
  80. "ParallelIngestion",
  81. "SubscribeParallelTableWithIndex",
  82. "DeltaJoinMaintained",
  83. "Update",
  84. "Retraction",
  85. ):
  86. # PR#28307 (Render regions for object build and let bindings) increases messages
  87. min_ancestor_mz_version_per_commit[
  88. "ffcafa5b5c3e83845a868cf6103048c045b4f155"
  89. ] = MzVersion.parse_mz("v0.113.0")
  90. if "OptbenchTPCH" in scenario_class_name:
  91. # PR#28664 (Introduce MirScalarExpr::reduce_safely) increases wallclock
  92. min_ancestor_mz_version_per_commit[
  93. "0a570022e1b78a205d5d9d3ebcb640b714e738c2"
  94. ] = MzVersion.parse_mz("v0.111.0")
  95. if scenario_class_name in {"OptbenchTPCHQ02", "OptbenchTPCHQ18", "OptbenchTPCHQ21"}:
  96. # PR#28566 (Incorporate non-null information, and prevent its deletion) increased wallclock
  97. min_ancestor_mz_version_per_commit[
  98. "45d78090f8fea353dbdff9f1b2de463d475fabc3"
  99. ] = MzVersion.parse_mz("v0.111.0")
  100. if scenario_class_name == "ManyKafkaSourcesOnSameCluster":
  101. # PR#28359 (Reapply "storage: wire up new reclock implementation") increased wallclock
  102. min_ancestor_mz_version_per_commit[
  103. "1937ca8b444a919e3077843980c97d61fc072252"
  104. ] = MzVersion.parse_mz("v0.110.0")
  105. if scenario_class_name == "ManyKafkaSourcesOnSameCluster":
  106. # PR#28228 (storage/kafka: round-robin partition/worker assignment) increased wallclock
  107. min_ancestor_mz_version_per_commit[
  108. "256e1f839ba5243293e738bcd78d0f36c1be8f3e"
  109. ] = MzVersion.parse_mz("v0.109.0")
  110. if scenario_class_name == "MinMax":
  111. # PR#27988 (adapter: always declare MV imports non-monotonic) increased wallclock and memory
  112. min_ancestor_mz_version_per_commit[
  113. "c18aa43828a7d2e9527151a0251c1f75a06d1469"
  114. ] = MzVersion.parse_mz("v0.108.0")
  115. if scenario_class_name == "AccumulateReductions":
  116. # PR#26807 (compute: hydration status based on output frontiers) increased messages
  117. min_ancestor_mz_version_per_commit[
  118. "be0e50041169a5cac80c033b083c920b067d049f"
  119. ] = MzVersion.parse_mz("v0.106.0")
  120. if scenario_class_name == "SwapSchema":
  121. # PR#27607 (catalog: Listen for updates in transactions) increased wallclock
  122. min_ancestor_mz_version_per_commit[
  123. "eef900de75d25fe854524dff9feeed8057e4bf79"
  124. ] = MzVersion.parse_mz("v0.105.0")
  125. if scenario_class_name == "MySqlInitialLoad":
  126. # PR#27058 (storage: wire up new reclock implementation) increased memory usage
  127. min_ancestor_mz_version_per_commit[
  128. "10abb1cca257ffc3d605c99ed961e037bbf3fa51"
  129. ] = MzVersion.parse_mz("v0.103.0")
  130. if "OptbenchTPCH" in scenario_class_name:
  131. # PR#26652 (explain: fix tracing fast path regression) significantly increased wallclock for OptbenchTPCH
  132. min_ancestor_mz_version_per_commit[
  133. "96c22562745f59010860bd825de5b4007a172c70"
  134. ] = MzVersion.parse_mz("v0.97.0")
  135. # PR#24155 (equivalence propagation) significantly increased wallclock for OptbenchTPCH
  136. min_ancestor_mz_version_per_commit[
  137. "3cfaa8207faa7df087942cd44311a3e7b4534c25"
  138. ] = MzVersion.parse_mz("v0.92.0")
  139. if scenario_class_name == "FastPathFilterNoIndex":
  140. # PR#26084 (Optimize OffsetList) increased wallclock
  141. min_ancestor_mz_version_per_commit[
  142. "2abcd90ac3201b0235ea41c5db81bdd931a0fda0"
  143. ] = MzVersion.parse_mz("v0.96.0")
  144. if scenario_class_name == "ParallelDataflows":
  145. # PR#26020 (Stage flatmap execution to consolidate as it goes) significantly increased wallclock
  146. min_ancestor_mz_version_per_commit[
  147. "da35946d636607a11fa27d5a8ea6e9939bf9525e"
  148. ] = MzVersion.parse_mz("v0.93.0")
  149. # add legacy entries
  150. min_ancestor_mz_version_per_commit.update(
  151. {
  152. # insert newer commits at the top
  153. # PR#25502 (JoinFusion across MFPs) increased number of messages
  154. "62ea182963be5b956e13115b8ad39f7835fc4351": MzVersion.parse_mz("v0.91.0"),
  155. # PR#24906 (Compute operator hydration status logging) increased number of messages against v0.88.1
  156. "067ae870eef724f7eb5851b5745b9ff52b881481": MzVersion.parse_mz("v0.89.0"),
  157. # PR#24918 (txn-wal: switch to a new operator protocol for lazy) increased number of messages against v0.86.1 (but got reverted in 0.87.1)
  158. "b648576b52b8ba9bb3a4732f7022ab5c06ebed32": MzVersion.parse_mz("v0.87.0"),
  159. # PR#23659 (txn-wal: enable in CI with "eager uppers") introduces regressions against v0.79.0
  160. "c4f520a57a3046e5074939d2ea345d1c72be7079": MzVersion.parse_mz("v0.80.0"),
  161. # PR#23421 (coord: smorgasbord of improvements for the crdb-backed timestamp oracle) introduces regressions against 0.78.13
  162. "5179ebd39aea4867622357a832aaddcde951b411": MzVersion.parse_mz("v0.79.0"),
  163. # insert newer commits at the top
  164. }
  165. )
  166. return min_ancestor_mz_version_per_commit
  167. _MIN_ANCESTOR_MZ_VERSION_PER_COMMIT_TO_ACCOUNT_FOR_SCALABILITY_REGRESSIONS: dict[
  168. str, MzVersion
  169. ] = {
  170. # insert newer commits at the top
  171. # PR#31309 ([adapter] don't block on builtin table write in Session creation) increases latency for inserts
  172. "e8c42c65afb7acd55eb7e530a92c89a9165f2e33": MzVersion.parse_mz("v0.133.0"),
  173. # PR#30238 (adapter: Remove the global write lock) introduces regressions against v0.123.0
  174. "98678454a334a470ceea46b126586c7e60a0d8a5": MzVersion.parse_mz("v0.124.0"),
  175. # PR#28307 (Render regions for object build and let bindings) introduces regressions against v0.112.0
  176. "ffcafa5b5c3e83845a868cf6103048c045b4f155": MzVersion.parse_mz("v0.113.0"),
  177. # PR#23659 (txn-wal: enable in CI with "eager uppers") introduces regressions against v0.79.0
  178. "c4f520a57a3046e5074939d2ea345d1c72be7079": MzVersion.parse_mz("v0.80.0"),
  179. # PR#23421 (coord: smorgasbord of improvements for the crdb-backed timestamp oracle) introduces regressions against 0.78.13
  180. "5179ebd39aea4867622357a832aaddcde951b411": MzVersion.parse_mz("v0.79.0"),
  181. # insert newer commits at the top
  182. }
  183. """
  184. Git revisions that are based on commits listed as keys require at least the version specified in the value.
  185. Note that specified versions do not necessarily need to be already published.
  186. Commits must be ordered descending by their date.
  187. """
  188. _MIN_ANCESTOR_MZ_VERSION_PER_COMMIT_TO_ACCOUNT_FOR_CORRECTNESS_REGRESSIONS: dict[
  189. str, MzVersion
  190. ] = {
  191. # insert newer commits at the top
  192. # PR#29179: Add client_address to session
  193. "deb8beb77ddb69895aad899cf2eab90a0a78585d": MzVersion.parse_mz("v0.118.0"),
  194. # PR#24497 (Make sure variance never returns a negative number) changes DFR or CTF handling compared to v0.84.0
  195. "82a5130a8466525c5b3bdb3eff845c7c34585774": MzVersion.parse_mz("v0.85.0"),
  196. }
  197. """
  198. See: #_MIN_ANCESTOR_MZ_VERSION_PER_COMMIT_TO_ACCOUNT_FOR_PERFORMANCE_REGRESSIONS
  199. """
  200. ANCESTOR_OVERRIDES_FOR_SCALABILITY_REGRESSIONS = (
  201. _MIN_ANCESTOR_MZ_VERSION_PER_COMMIT_TO_ACCOUNT_FOR_SCALABILITY_REGRESSIONS
  202. )
  203. ANCESTOR_OVERRIDES_FOR_CORRECTNESS_REGRESSIONS = (
  204. _MIN_ANCESTOR_MZ_VERSION_PER_COMMIT_TO_ACCOUNT_FOR_CORRECTNESS_REGRESSIONS
  205. )