Commit 711e632
authored
Implement a fingerprinting mechanism to track compaction states in a more efficient manner (#18844)
* meatadata store bits part 1
* annotate segments with compaction fingerprint before persist
* Add ability to generate compaction state fingerprint
* add fingerprint to task context and make legacy last compaction state storage configurable
* update embedded tests for compaction supervisors to flex fingerprints
* checkpoint with persisting compaction states
* add duty to clean up unused compaction states
* take fingerprints into account in CompactionStatus
* Add and improve tests
* get rid of some todo comments
* fix checkstyle
* cleanup some more TODO
* Add some docs
* update web console
* make cache size configurable and fix some spelling
* fixup use of deprecated builder
* fix checktyle
* fix coordinator compactsegments duty and respond to self review comments
* fix spellchecker
* predates is a word
* improve some javadocs
* simplify some test assertions based on review
* better naming
* controller impl cleanup
* For compaction supervisors, take persisting pending compaction states out of hot path
* use Configs.valueOrDefault helper in data segment
* Refactor where fingerprinting happens and how the object mapper is wired up
* refactor CompactionStateManager into an interface with a persisted and heap impl
* remove fingerprinting support from the coordinator compact segments duty
* Move on heap compaction state manager to test sources
* CompactionStateManager is now overlord only
* Refactor how the compaction state fingerprint cache is wired up
* prettify
* small changes after self-review
* Cleanup CompactionStateCache per review
* compactionstatemanager to compactionstatestorage plus refactor
* Add compaction state added and deleted metrics
* improve queries for compaction state cache sync
* clean up doc wording
* Miscl. cleanup from review
* some metadata store code cleanup
* refactor id out of the compaction states table as it is superflous
* Some CompactionStatus cleanup
* Migrate the location of creating a compaction state from config
* More refactoring per review
* refactor to remove duplicate fingerprint generator code
* Do some consolidation of fingerprint related classes to clean up code
* minor cleanup
* fix fobidden api use
* Improvements and cleanup to the fingerprint and state persist + cache
* Refactor where in the code compaction fingerprints are generated
* Formalize unique constraint exception check in sqlmetadataconnector and db specific impls
* some naming cleanup
* Migrate the compaction state cleanup duty to the overlord
* Blow up the compaction supervisor scheduler if incremental caching is disabled
* add some strict input sanitization in upserting compaction fingerprints
* cleanup test class
* Add pending flag to compaction state to prevent potentially destructive early cleanup
* Refactor database naming to use indexingState instead of compactionState
* Refactor naming to IndexingState for the metadata cleanup duty
* refresh some docs
* fixup tests
* Refactoring name of CompactionStateCache to IndexingStateCache
* Rename CompactionStateStorage to IndexingStateStorage
* Refactor compactionStateFingerprint out of the code in favor of indexingStateFingerprint
* Refactor FingerprintMapper name to remove compaction for indexing state
* refactorings after self review
* fixup a few things post merge with master
* Cleanup and refactor after code review round
Batch marking of indexing states as active to avoid chained updates where only one is needed
Build segments table missing columns error column by column
refactor how we are configuring and executing the ol metadata cleanup duties.
fix missed naming refactor
Improve readability of upsertIndexingState
Fixup SqlIndexingStateStorage constructor
drop default impl of isUniqueConstraintViolation
Refactor how the deterministic mapper is handled for reindexing
* cleanup
* use effective state for dimspec and indexspec for reindexing fingerprinting
* Only call into running checks if there are unknown states to check1 parent b1aa660 commit 711e632
108 files changed
Lines changed: 5269 additions & 168 deletions
File tree
- benchmarks/src/test/java/org/apache/druid/server/coordinator
- docs
- api-reference
- configuration
- data-management
- operations
- embedded-tests/src/test/java/org/apache/druid/testing/embedded
- compact
- indexing
- extensions-contrib
- materialized-view-maintenance/src/test/java/org/apache/druid/indexing/materializedview
- materialized-view-selection/src/test/java/org/apache/druid/query/materializedview
- sqlserver-metadata-storage/src
- main/java/org/apache/druid/metadata/storage/sqlserver
- test/java/org/apache/druid/metadata/storage/sqlserver
- extensions-core
- druid-catalog/src/test/java/org/apache/druid/catalog/compact
- mysql-metadata-storage/src
- main/java/org/apache/druid/metadata/storage/mysql
- test/java/org/apache/druid/metadata/storage/mysql
- postgresql-metadata-storage/src
- main/java/org/apache/druid/metadata/storage/postgresql
- test/java/org/apache/druid/metadata/storage/postgresql
- indexing-hadoop/src/main/java/org/apache/druid/indexer/updater
- indexing-service/src
- main/java/org/apache/druid/indexing
- common/task
- batch/parallel
- compact
- overlord
- config
- duty
- test/java/org/apache/druid/indexing
- common
- actions
- task
- compact
- overlord
- duty
- http
- seekablestream
- multi-stage-query/src/main/java/org/apache/druid/msq
- exec
- input/table
- processing/src
- main/java/org/apache/druid
- data/input/impl
- metadata
- timeline
- test
- java/org/apache/druid
- metadata
- timeline
- resources
- server/src
- main/java/org/apache/druid
- metadata
- segment
- cache
- storage/derby
- segment/metadata
- server
- compaction
- coordination
- coordinator
- duty
- http
- test/java/org/apache/druid
- client
- metadata
- segment
- cache
- rpc/indexing
- segment/metadata
- server
- compaction
- coordinator
- duty
- http
- services/src/main/java/org/apache/druid
- cli
- guice
- web-console/src
- dialogs/compaction-dynamic-config-dialog
- druid-models/compaction-dynamic-config
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
24 | 25 | | |
| 26 | + | |
| 27 | + | |
25 | 28 | | |
26 | 29 | | |
27 | 30 | | |
| |||
135 | 138 | | |
136 | 139 | | |
137 | 140 | | |
138 | | - | |
| 141 | + | |
| 142 | + | |
139 | 143 | | |
140 | 144 | | |
141 | 145 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
889 | 889 | | |
890 | 890 | | |
891 | 891 | | |
| 892 | + | |
892 | 893 | | |
893 | 894 | | |
894 | 895 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
389 | 389 | | |
390 | 390 | | |
391 | 391 | | |
| 392 | + | |
392 | 393 | | |
393 | 394 | | |
394 | 395 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
241 | 241 | | |
242 | 242 | | |
243 | 243 | | |
| 244 | + | |
244 | 245 | | |
245 | 246 | | |
246 | | - | |
| 247 | + | |
247 | 248 | | |
248 | | - | |
249 | | - | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
250 | 256 | | |
251 | 257 | | |
252 | 258 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
| |||
59 | 60 | | |
60 | 61 | | |
61 | 62 | | |
62 | | - | |
| 63 | + | |
63 | 64 | | |
64 | 65 | | |
65 | 66 | | |
| |||
131 | 132 | | |
132 | 133 | | |
133 | 134 | | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
134 | 156 | | |
135 | 157 | | |
136 | 158 | | |
| |||
160 | 182 | | |
161 | 183 | | |
162 | 184 | | |
163 | | - | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
164 | 188 | | |
165 | 189 | | |
166 | 190 | | |
| |||
178 | 202 | | |
179 | 203 | | |
180 | 204 | | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
181 | 211 | | |
182 | 212 | | |
183 | 213 | | |
184 | 214 | | |
185 | 215 | | |
| 216 | + | |
| 217 | + | |
186 | 218 | | |
187 | 219 | | |
188 | 220 | | |
| |||
226 | 258 | | |
227 | 259 | | |
228 | 260 | | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
229 | 273 | | |
230 | 274 | | |
231 | 275 | | |
| |||
Lines changed: 6 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1508 | 1508 | | |
1509 | 1509 | | |
1510 | 1510 | | |
1511 | | - | |
| 1511 | + | |
1512 | 1512 | | |
1513 | 1513 | | |
1514 | 1514 | | |
| |||
1552 | 1552 | | |
1553 | 1553 | | |
1554 | 1554 | | |
1555 | | - | |
| 1555 | + | |
1556 | 1556 | | |
1557 | 1557 | | |
1558 | 1558 | | |
| |||
1854 | 1854 | | |
1855 | 1855 | | |
1856 | 1856 | | |
1857 | | - | |
| 1857 | + | |
1858 | 1858 | | |
1859 | 1859 | | |
1860 | 1860 | | |
| |||
1864 | 1864 | | |
1865 | 1865 | | |
1866 | 1866 | | |
1867 | | - | |
| 1867 | + | |
1868 | 1868 | | |
1869 | 1869 | | |
1870 | 1870 | | |
| |||
1956 | 1956 | | |
1957 | 1957 | | |
1958 | 1958 | | |
1959 | | - | |
| 1959 | + | |
| 1960 | + | |
1960 | 1961 | | |
1961 | 1962 | | |
1962 | 1963 | | |
| |||
0 commit comments