Commit 82b5a2d
Allow ingestion of any DB generated SST file (facebook#13878)
Summary:
`IngestExternalFileOptions::allow_db_generated_files` requires SST files to have zero sequence number. This PR opens it up for any DB generated SST files. Currently we don't do global sequence number assignment when `allow_db_generated_files` is true, so we require that files do not overlap with any key in the CF. One behavior difference is that now we allow ingesting overlapping files when `allow_db_generated_files` is true. Users need to ensure that files are ordered such that later files have more recent updates.
Intended follow ups:
- Record smallest seqno in table property, so that we don't need to scan the file for it.
- Cover allow_db_generated_files in crash test. We may create a new DB and ingest all files from a CF for verification.
- Add APIs that uses allow_db_generated_files. For example, an API for ingesting SST files from a source CF, so that we take care of ingestion file ordering for user. If we are already getting metadata from the source CF, we may be use it as a hint for level placement instead of dividing input files into batches again (`ExternalSstFileIngestionJob::DivideInputFilesIntoBatches`).
Pull Request resolved: facebook#13878
Test Plan: two new unit tests.
Reviewed By: hx235, xingbowang
Differential Revision: D80233727
Pulled By: cbi42
fbshipit-source-id: 74209386d8426c434bff2d9a734f06db537eb50c1 parent 439e170 commit 82b5a2d
12 files changed
Lines changed: 815 additions & 197 deletions
File tree
- db
- db_impl
- include/rocksdb
- unreleased_history/public_api_changes
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6009 | 6009 | | |
6010 | 6010 | | |
6011 | 6011 | | |
6012 | | - | |
6013 | | - | |
| 6012 | + | |
| 6013 | + | |
6014 | 6014 | | |
6015 | | - | |
6016 | | - | |
6017 | | - | |
| 6015 | + | |
| 6016 | + | |
6018 | 6017 | | |
6019 | | - | |
| 6018 | + | |
6020 | 6019 | | |
6021 | | - | |
6022 | | - | |
6023 | | - | |
| 6020 | + | |
| 6021 | + | |
| 6022 | + | |
| 6023 | + | |
| 6024 | + | |
6024 | 6025 | | |
6025 | 6026 | | |
6026 | 6027 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1154 | 1154 | | |
1155 | 1155 | | |
1156 | 1156 | | |
1157 | | - | |
1158 | | - | |
1159 | | - | |
1160 | | - | |
1161 | | - | |
1162 | | - | |
1163 | | - | |
1164 | | - | |
1165 | | - | |
| 1157 | + | |
| 1158 | + | |
| 1159 | + | |
| 1160 | + | |
| 1161 | + | |
| 1162 | + | |
| 1163 | + | |
| 1164 | + | |
1166 | 1165 | | |
| 1166 | + | |
| 1167 | + | |
| 1168 | + | |
1167 | 1169 | | |
1168 | 1170 | | |
1169 | 1171 | | |
| |||
1196 | 1198 | | |
1197 | 1199 | | |
1198 | 1200 | | |
1199 | | - | |
1200 | | - | |
| 1201 | + | |
| 1202 | + | |
| 1203 | + | |
| 1204 | + | |
| 1205 | + | |
| 1206 | + | |
| 1207 | + | |
| 1208 | + | |
| 1209 | + | |
| 1210 | + | |
| 1211 | + | |
| 1212 | + | |
1201 | 1213 | | |
1202 | 1214 | | |
1203 | 1215 | | |
1204 | | - | |
| 1216 | + | |
1205 | 1217 | | |
1206 | 1218 | | |
1207 | 1219 | | |
| |||
1334 | 1346 | | |
1335 | 1347 | | |
1336 | 1348 | | |
| 1349 | + | |
| 1350 | + | |
| 1351 | + | |
| 1352 | + | |
| 1353 | + | |
| 1354 | + | |
1337 | 1355 | | |
1338 | | - | |
1339 | | - | |
1340 | | - | |
1341 | | - | |
1342 | | - | |
| 1356 | + | |
1343 | 1357 | | |
1344 | 1358 | | |
1345 | 1359 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1280 | 1280 | | |
1281 | 1281 | | |
1282 | 1282 | | |
| 1283 | + | |
| 1284 | + | |
| 1285 | + | |
1283 | 1286 | | |
1284 | 1287 | | |
1285 | 1288 | | |
| |||
1289 | 1292 | | |
1290 | 1293 | | |
1291 | 1294 | | |
| 1295 | + | |
| 1296 | + | |
1292 | 1297 | | |
1293 | 1298 | | |
1294 | 1299 | | |
| |||
1320 | 1325 | | |
1321 | 1326 | | |
1322 | 1327 | | |
| 1328 | + | |
| 1329 | + | |
| 1330 | + | |
1323 | 1331 | | |
1324 | 1332 | | |
1325 | 1333 | | |
| |||
0 commit comments