Skip to content

Commit

Permalink
VOPR: Log current and highest available release
Browse files Browse the repository at this point in the history
  • Loading branch information
sentientwaffle committed Mar 8, 2024
1 parent e1c4aff commit 5add306
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 19 deletions.
39 changes: 20 additions & 19 deletions docs/internals/testing.md
Expand Up @@ -42,30 +42,31 @@ Documentation for (roughly) code in the `src/testing` directory.
8. Journal faulty/dirty: `0/1Jd` indicates that the journal has 0 faulty headers and 1 dirty headers.
9. WAL prepare ops: e.g. `85:149Wo` indicates that the op of the oldest prepare in the WAL is `85` and the op of the newest prepare in the WAL is `149`.
10. Syncing ops: e.g. `<0:123>` indicates that `vsr_state.sync_op_min=0` and `vsr_state.sync_op_max=123`.
11. Grid blocks acquired: e.g. `167Ga` indicates that the grid has `167` blocks currently in use.
12. Grid blocks queued `grid.read_remote_queue`: e.g. `0G!` indicates that there are `0` reads awaiting remote fulfillment.
13. Grid blocks queued `grid_blocks_missing`: e.g. `0G?` indicates that there are `0` blocks awaiting remote repair.
14. Pipeline prepares (primary-only): e.g. `1/4Pp` indicates that the primary's pipeline has 2 prepares queued, out of a capacity of 4.
15. Pipeline requests (primary-only): e.g. `0/3Pq` indicates that the primary's pipeline has 0 requests queued, out of a capacity of 3.
11. Release version: e.g. `v1:2` indicates that the replica is running release version `1`, and that its maximum available release is `2`.
12. Grid blocks acquired: e.g. `167Ga` indicates that the grid has `167` blocks currently in use.
13. Grid blocks queued `grid.read_remote_queue`: e.g. `0G!` indicates that there are `0` reads awaiting remote fulfillment.
14. Grid blocks queued `grid_blocks_missing`: e.g. `0G?` indicates that there are `0` blocks awaiting remote repair.
15. Pipeline prepares (primary-only): e.g. `1/4Pp` indicates that the primary's pipeline has 2 prepares queued, out of a capacity of 4.
16. Pipeline requests (primary-only): e.g. `0/3Pq` indicates that the primary's pipeline has 0 requests queued, out of a capacity of 3.

### Example

(The first line labels the columns, but is not part of the actual VOPR output).

```
1 2 3 4-------- 5--- 6---------- 7------- 8----- 9------- 10----- 11----- 12- 13- 14--- 15---
1 2 3 4-------- 5--- 6---------- 7------- 8----- 9------- 10----- 11-- 12----- 13- 14- 15--- 16---
3 [ / . 3V 71/_99/_99C 68:_99Jo 0/_0J! 68:_99Wo <__0:__0> 183Ga 0G! 0G? 0/4Pp 0/3Rq
4 ^ \ . 2V 23/_23/_46C 19:_50Jo 0/_0J! 19:_50Wo <__0:__0> nullGa 0G! 0G?
2 \ . 3V 71/_99/_99C 68:_99Jo 0/_0J! 68:_99Wo <__0:__0> 183Ga 0G! 0G?
2 [ \ . 3V 71/_99/_99C 68:_99Jo 0/_0J! 68:_99Wo <__0:__0> 183Ga 0G! 0G?
6 | . 3V 71/_99/_99C 68:_99Jo 0/_0J! 68:_99Wo <__0:__0> 183Ga 0G! 0G?
6 [ | . 3V 71/_99/_99C 68:_99Jo 0/_0J! 68:_99Wo <__0:__0> 183Ga 0G! 0G?
3 ] / . 3V 95/_99/_99C 68:_99Jo 0/_0J! 68:_99Wo <__0:__0> 167Ga 0G! 0G? 0/4Pp 0/3Rq
2 ] \ . 3V 95/_99/_99C 68:_99Jo 0/_0J! 68:_99Wo <__0:__0> 167Ga 0G! 0G?
1 \ . 3V 71/_99/_99C 68:_99Jo 0/_1J! 67:_98Wo <__0:__0> 183Ga 0G! 0G?
1 [ \ . 3V 71/_99/_99C 68:_99Jo 0/_1J! 67:_98Wo <__0:__0> 183Ga 0G! 0G?
4 < ~ v 3V 23/_23/_46C 19:_50Jo 0/_0J! 19:_50Wo <__0:__0> 66Ga 0G! 0G?
5 | . 3V 71/_99/_99C 68:_99Jo 0/_0J! 68:_99Wo <__0:__0> 183Ga 0G! 0G?
5 [ | . 3V 71/_99/_99C 68:_99Jo 0/_0J! 68:_99Wo <__0:__0> 183Ga 0G! 0G?
3 [ / . 3V 71/_99/_99C 68:_99Jo 0/_0J! 68:_99Wo <__0:__0> v1:2 183Ga 0G! 0G? 0/4Pp 0/3Rq
4 ^ \ . 2V 23/_23/_46C 19:_50Jo 0/_0J! 19:_50Wo <__0:__0> v1:2 nullGa 0G! 0G?
2 \ . 3V 71/_99/_99C 68:_99Jo 0/_0J! 68:_99Wo <__0:__0> v1:2 183Ga 0G! 0G?
2 [ \ . 3V 71/_99/_99C 68:_99Jo 0/_0J! 68:_99Wo <__0:__0> v1:2 183Ga 0G! 0G?
6 | . 3V 71/_99/_99C 68:_99Jo 0/_0J! 68:_99Wo <__0:__0> v1:2 183Ga 0G! 0G?
6 [ | . 3V 71/_99/_99C 68:_99Jo 0/_0J! 68:_99Wo <__0:__0> v1:2 183Ga 0G! 0G?
3 ] / . 3V 95/_99/_99C 68:_99Jo 0/_0J! 68:_99Wo <__0:__0> v1:2 167Ga 0G! 0G? 0/4Pp 0/3Rq
2 ] \ . 3V 95/_99/_99C 68:_99Jo 0/_0J! 68:_99Wo <__0:__0> v1:2 167Ga 0G! 0G?
1 \ . 3V 71/_99/_99C 68:_99Jo 0/_1J! 67:_98Wo <__0:__0> v1:2 183Ga 0G! 0G?
1 [ \ . 3V 71/_99/_99C 68:_99Jo 0/_1J! 67:_98Wo <__0:__0> v1:2 183Ga 0G! 0G?
4 < ~ v 3V 23/_23/_46C 19:_50Jo 0/_0J! 19:_50Wo <__0:__0> v1:2 66Ga 0G! 0G?
5 | . 3V 71/_99/_99C 68:_99Jo 0/_0J! 68:_99Wo <__0:__0> v1:2 183Ga 0G! 0G?
5 [ | . 3V 71/_99/_99C 68:_99Jo 0/_0J! 68:_99Wo <__0:__0> v1:2 183Ga 0G! 0G?
```
3 changes: 3 additions & 0 deletions src/testing/cluster.zig
Expand Up @@ -629,6 +629,7 @@ pub fn ClusterType(comptime StateMachineType: anytype) type {
"{[journal_faulty]:>2}/{[journal_dirty]:_>2}J! " ++
"{[wal_op_min]:>3}:{[wal_op_max]:_>3}Wo " ++
"<{[sync_op_min]:_>3}:{[sync_op_max]:_>3}> " ++
"v{[release]}:{[release_max]} " ++
"{[grid_blocks_acquired]?:>5}Ga " ++
"{[grid_blocks_global]:>2}G! " ++
"{[grid_blocks_repair]:>3}G?", .{
Expand All @@ -644,6 +645,8 @@ pub fn ClusterType(comptime StateMachineType: anytype) type {
.wal_op_max = wal_op_max,
.sync_op_min = replica.superblock.working.vsr_state.sync_op_min,
.sync_op_max = replica.superblock.working.vsr_state.sync_op_max,
.release = replica.release,
.release_max = replica.releases_bundled.get(0),
.grid_blocks_acquired = if (replica.grid.free_set.opened)
replica.grid.free_set.count_acquired()
else
Expand Down

0 comments on commit 5add306

Please sign in to comment.