Commit 7e82f2c
authored
Improve code-containment and efficiency of etag-aware loading (#1296)
* Improve code-containment and efficiency of etag-aware loading
-Make the hash generation resilient against null metadataLocation
-Use getResolvedPath instead of getPassthroughResolvedPath to avoid redundant persistence round-trip
-Only try to calculate the etag for comparison against ifNoneMatch if the ifNoneMatch is actually provided
* Add strict null-checking at callsites to generateETag, disallow passing null to generator
* Add TODO to refactor shared logic for etag generation1 parent b50e594 commit 7e82f2c
File tree
3 files changed
+74
-34
lines changed- service/common/src/main/java/org/apache/polaris/service
- catalog/iceberg
- http
3 files changed
+74
-34
lines changedservice/common/src/main/java/org/apache/polaris/service/catalog/iceberg/IcebergCatalogAdapter.java
Lines changed: 32 additions & 20 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
235 | 235 | | |
236 | 236 | | |
237 | 237 | | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
238 | 263 | | |
239 | 264 | | |
240 | 265 | | |
| |||
312 | 337 | | |
313 | 338 | | |
314 | 339 | | |
315 | | - | |
316 | | - | |
317 | | - | |
318 | | - | |
319 | | - | |
| 340 | + | |
| 341 | + | |
320 | 342 | | |
321 | 343 | | |
322 | 344 | | |
323 | 345 | | |
324 | | - | |
325 | | - | |
326 | | - | |
327 | | - | |
328 | | - | |
| 346 | + | |
| 347 | + | |
329 | 348 | | |
330 | 349 | | |
331 | 350 | | |
| |||
384 | 403 | | |
385 | 404 | | |
386 | 405 | | |
387 | | - | |
388 | | - | |
389 | | - | |
390 | | - | |
391 | | - | |
| 406 | + | |
392 | 407 | | |
393 | 408 | | |
394 | 409 | | |
| |||
446 | 461 | | |
447 | 462 | | |
448 | 463 | | |
449 | | - | |
450 | | - | |
451 | | - | |
452 | | - | |
453 | | - | |
| 464 | + | |
| 465 | + | |
454 | 466 | | |
455 | 467 | | |
456 | 468 | | |
| |||
service/common/src/main/java/org/apache/polaris/service/catalog/iceberg/IcebergCatalogHandler.java
Lines changed: 37 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
503 | 503 | | |
504 | 504 | | |
505 | 505 | | |
506 | | - | |
507 | | - | |
| 506 | + | |
508 | 507 | | |
509 | 508 | | |
510 | 509 | | |
| |||
529 | 528 | | |
530 | 529 | | |
531 | 530 | | |
532 | | - | |
533 | | - | |
534 | | - | |
535 | | - | |
536 | | - | |
537 | | - | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
538 | 549 | | |
539 | 550 | | |
540 | 551 | | |
| |||
601 | 612 | | |
602 | 613 | | |
603 | 614 | | |
604 | | - | |
605 | | - | |
606 | | - | |
607 | | - | |
608 | | - | |
609 | | - | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
610 | 633 | | |
611 | 634 | | |
612 | 635 | | |
| |||
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
35 | 40 | | |
36 | 41 | | |
37 | 42 | | |
| |||
0 commit comments