Repository navigation
Commit cf593df
Log pool ID and record it for failed allocations
Summary:
- `LoggerEventSink` now sets `pool_id` when `EventInfo::poolId` is present. Every logger config in `CachelibEventTrackerMultiplexLoggerConfig` already has this nullable column, so this needs no schema change and leaves existing Ucache rows unaffected (Ucache logs a constant pool).
- Failed `ALLOCATE` events now carry the pool the allocation targeted (`pid`), which was known but not passed.
- `pool_id` is the pool's index within its cache instance (`addPool` order), not a cross-host identifier.
- Tests: the allocator change is covered by the open-source `EventTrackerTest`. The `pool_id` column check needs the internal logger, so it lives in `cache_admin_test` next to the existing `LoggerEventSink` test.
Events that log `pool_id` (when enabled and sampled):
- `FIND`, `FIND_FAST`, `PEEK` with `FOUND` or `EXPIRED`
- `ALLOCATE` with `ALLOCATED`, and with `FAILED` (new in this diff)
- `ALLOCATE_CHAINED`, `ADD_CHAINED`, `POP_CHAINED`
- `INSERT`, `INSERT_FROM_NVM`, `INSERT_OR_REPLACE` (all results)
- `REMOVE` once the item has been located (by handle, iterator, or found key)
- `DRAM_EVICT` (`EVICTED`, `NVM_ADMITTED`)
- `NVM_ADMIT`
- `NVM_FIND` with `FOUND` or `EXPIRED` read from flash (the NVM item keeps its original pool)
- `NVM_EVICT`
Events that still log no `pool_id`:
- `FIND`, `FIND_FAST`, `PEEK` with `NOT_FOUND`: the key index is shared across pools, so a miss has no pool
- `REMOVE` by key with `NOT_FOUND`
- `NVM_FIND`, `NVM_FIND_FAST` when the item turns out to be in DRAM during the NVM lookup (`checkShared` has the handle but does not pass it)
- `NVM_FIND` with `NOT_FOUND` or `FAILED`
- `NVM_INSERT` (all results; the completion callback has only the key and value)
- `NVM_REMOVE`
- `NVM_REINSERT` (recorded by Navy `BlockCache` with only the key and size)
Reviewed By: AlnisM
Differential Revision: D131610120
fbshipit-source-id: dd6d73bf4db3136e61078cd339ffdee766a8df641 parent aa8ad50 commit cf593df
2 files changed
Lines changed: 69 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3391 | 3391 | | |
3392 | 3392 | | |
3393 | 3393 | | |
3394 | | - | |
3395 | | - | |
3396 | | - | |
3397 | | - | |
| 3394 | + | |
| 3395 | + | |
| 3396 | + | |
| 3397 | + | |
| 3398 | + | |
| 3399 | + | |
3398 | 3400 | | |
3399 | 3401 | | |
3400 | 3402 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| 26 | + | |
25 | 27 | | |
| 28 | + | |
26 | 29 | | |
27 | 30 | | |
28 | 31 | | |
| |||
612 | 615 | | |
613 | 616 | | |
614 | 617 | | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
0 commit comments