Skip to content

Instantly share code, notes, and snippets.

@Matan-B
Last active May 31, 2023 14:37
Show Gist options
  • Save Matan-B/37173faa5da0abe4f621e92b71867fef to your computer and use it in GitHub Desktop.
Save Matan-B/37173faa5da0abe4f621e92b71867fef to your computer and use it in GitHub Desktop.
  • Before the change:

    handled osd_map messages may have epochs intersections,
    While we are trying to avoid proccessing the same map more than once,
    we can only assure than it is safe to skip an already handled osd map
    *only* after it was processed (and written to the superblock).
    
  • Logs:

INFO  2023-05-15 12:28:50,249 [shard 0] osd - handle_osd_map epochs [1..5], i have 0, src has [1..5]                                                                       
INFO  2023-05-15 12:28:51,245 [shard 0] osd - handle_osd_map epochs [5..6], i have 5, src has [1..6]                                                                       
INFO  2023-05-15 12:28:51,246 [shard 0] osd - handle_osd_map epochs [6..6], i have 6, src has [1..6]                                                                       
INFO  2023-05-15 12:28:55,309 [shard 0] osd - handle_osd_map epochs [6..7], i have 6, src has [1..7]                                                                       
INFO  2023-05-15 12:28:58,339 [shard 0] osd - handle_osd_map epochs [7..8], i have 7, src has [1..8]                                                                       
INFO  2023-05-15 12:29:04,389 [shard 0] osd - handle_osd_map epochs [8..10], i have 8, src has [8..10]                                                                     
INFO  2023-05-15 12:29:04,390 [shard 0] osd - handle_osd_map epochs [8..10], i have 10, src has [8..10]                                                                    
INFO  2023-05-15 12:29:08,256 [shard 0] osd - handle_osd_map epochs [10..12], i have 10, src has [10..12]
INFO  2023-05-15 12:29:08,257 [shard 0] osd - handle_osd_map epochs [10..12], i have 12, src has [10..12]
INFO  2023-05-15 12:29:08,367 [shard 0] osd - handle_osd_map epochs [12..13], i have 12, src has [1..13]
INFO  2023-05-15 12:29:09,368 [shard 0] osd - handle_osd_map epochs [13..14], i have 13, src has [1..14]
INFO  2023-05-15 12:29:14,256 [shard 0] osd - handle_osd_map epochs [14..15], i have 14, src has [14..15]
INFO  2023-05-15 12:29:14,257 [shard 0] osd - handle_osd_map epochs [14..15], i have 15, src has [14..15]
INFO  2023-05-15 12:29:14,259 [shard 0] osd - handle_osd_map epochs [14..16], i have 15, src has [14..16]
INFO  2023-05-15 12:29:14,261 [shard 0] osd - handle_osd_map epochs [14..16], i have 16, src has [14..16]
INFO  2023-05-15 12:29:18,430 [shard 0] osd - handle_osd_map epochs [16..17], i have 16, src has [16..17]
INFO  2023-05-15 12:29:18,431 [shard 0] osd - handle_osd_map epochs [16..17], i have 17, src has [16..17]
INFO  2023-05-15 12:29:25,405 [shard 0] osd - handle_osd_map epochs [17..18], i have 17, src has [1..18]
INFO  2023-05-15 12:29:26,409 [shard 0] osd - handle_osd_map epochs [19..19], i have 18, src has [1..19]
INFO  2023-05-15 12:29:26,411 [shard 0] osd - handle_osd_map epochs [18..19], i have 19, src has [1..19]
INFO  2023-05-15 12:29:27,411 [shard 0] osd - handle_osd_map epochs [20..20], i have 19, src has [1..20]
INFO  2023-05-15 12:29:27,452 [shard 0] osd - handle_osd_map epochs [19..20], i have 20, src has [1..20]
INFO  2023-05-15 12:29:29,360 [shard 0] osd - handle_osd_map epochs [20..21], i have 20, src has [20..21]
INFO  2023-05-15 12:29:29,361 [shard 0] osd - handle_osd_map epochs [20..21], i have 21, src has [20..21]

  • After the change:

    each handled epoch range is exclusive since we omitted the already handled ones earlier.
    
  • Logs:

INFO  2023-05-31 13:09:11,531 [shard 0] osd - maybe_handle_osd_maps will handle - first: 1 last: 8
INFO  2023-05-31 13:09:12,521 [shard 0] osd - maybe_handle_osd_maps will handle - first: 9 last: 9
INFO  2023-05-31 13:09:19,419 [shard 0] osd - maybe_handle_osd_maps will handle - first: 10 last: 10
INFO  2023-05-31 13:09:20,424 [shard 0] osd - maybe_handle_osd_maps will handle - first: 11 last: 11
INFO  2023-05-31 13:09:22,431 [shard 0] osd - maybe_handle_osd_maps will handle - first: 12 last: 12
INFO  2023-05-31 13:09:23,435 [shard 0] osd - maybe_handle_osd_maps will handle - first: 13 last: 13
INFO  2023-05-31 13:09:25,955 [shard 0] osd - maybe_handle_osd_maps will handle - first: 14 last: 14
INFO  2023-05-31 13:09:37,651 [shard 0] osd - maybe_handle_osd_maps will handle - first: 15 last: 15
INFO  2023-05-31 13:09:55,436 [shard 0] osd - maybe_handle_osd_maps will handle - first: 16 last: 16
INFO  2023-05-31 13:09:55,658 [shard 0] osd - maybe_handle_osd_maps will handle - first: 17 last: 17
INFO  2023-05-31 13:09:57,437 [shard 0] osd - maybe_handle_osd_maps will handle - first: 18 last: 18
INFO  2023-05-31 13:09:57,666 [shard 0] osd - maybe_handle_osd_maps will handle - first: 19 last: 19
INFO  2023-05-31 13:09:59,533 [shard 0] osd - maybe_handle_osd_maps will handle - first: 20 last: 20
INFO  2023-05-31 13:09:59,674 [shard 0] osd - maybe_handle_osd_maps will handle - first: 21 last: 21
INFO  2023-05-31 13:10:02,686 [shard 0] osd - maybe_handle_osd_maps will handle - first: 23 last: 24
INFO  2023-05-31 13:10:02,688 [shard 0] osd - maybe_handle_osd_maps will handle - first: 22 last: 24
INFO  2023-05-31 13:10:03,690 [shard 0] osd - maybe_handle_osd_maps will handle - first: 25 last: 25
INFO  2023-05-31 13:10:04,812 [shard 0] osd - maybe_handle_osd_maps will handle - first: 26 last: 26
INFO  2023-05-31 13:10:05,702 [shard 0] osd - maybe_handle_osd_maps will handle - first: 27 last: 27
INFO  2023-05-31 13:10:07,436 [shard 0] osd - maybe_handle_osd_maps will handle - first: 28 last: 28
INFO  2023-05-31 13:10:08,715 [shard 0] osd - maybe_handle_osd_maps will handle - first: 29 last: 30
INFO  2023-05-31 13:10:09,719 [shard 0] osd - maybe_handle_osd_maps will handle - first: 31 last: 31

Resulting in also exclusive PGAdvanceMap from and to epochs (which fixes: https://tracker.ceph.com/issues/59165)

EBUG 2023-05-31 14:11:12,742 [shard 0] osd - pg_advance_map(id=0, detail=PGAdvanceMap(pg=1.0 from=443 to=444)): created
DEBUG 2023-05-31 14:11:13,607 [shard 0] osd - pg_advance_map(id=0, detail=PGAdvanceMap(pg=1.0 from=444 to=445)): created
DEBUG 2023-05-31 14:11:14,603 [shard 0] osd - pg_advance_map(id=0, detail=PGAdvanceMap(pg=1.0 from=445 to=446)): created
DEBUG 2023-05-31 14:11:15,615 [shard 0] osd - pg_advance_map(id=0, detail=PGAdvanceMap(pg=1.0 from=446 to=447)): created
DEBUG 2023-05-31 14:11:17,304 [shard 0] osd - pg_advance_map(id=0, detail=PGAdvanceMap(pg=1.0 from=447 to=448)): created
DEBUG 2023-05-31 14:11:17,633 [shard 0] osd - pg_advance_map(id=0, detail=PGAdvanceMap(pg=1.0 from=448 to=449)): created
DEBUG 2023-05-31 14:11:18,627 [shard 0] osd - pg_advance_map(id=0, detail=PGAdvanceMap(pg=1.0 from=449 to=450)): created
DEBUG 2023-05-31 14:11:19,633 [shard 0] osd - pg_advance_map(id=0, detail=PGAdvanceMap(pg=1.0 from=450 to=451)): created
DEBUG 2023-05-31 14:11:20,706 [shard 0] osd - pg_advance_map(id=0, detail=PGAdvanceMap(pg=1.0 from=451 to=452)): created
DEBUG 2023-05-31 14:11:21,638 [shard 0] osd - pg_advance_map(id=0, detail=PGAdvanceMap(pg=1.0 from=452 to=453)): created
DEBUG 2023-05-31 14:11:22,875 [shard 0] osd - pg_advance_map(id=0, detail=PGAdvanceMap(pg=1.0 from=453 to=454)): created
DEBUG 2023-05-31 14:11:24,413 [shard 0] osd - pg_advance_map(id=0, detail=PGAdvanceMap(pg=1.0 from=454 to=455)): created
DEBUG 2023-05-31 14:11:24,692 [shard 0] osd - pg_advance_map(id=0, detail=PGAdvanceMap(pg=1.0 from=455 to=456)): created
DEBUG 2023-05-31 14:11:26,708 [shard 0] osd - pg_advance_map(id=0, detail=PGAdvanceMap(pg=1.0 from=456 to=458)): created
DEBUG 2023-05-31 14:11:27,710 [shard 0] osd - pg_advance_map(id=0, detail=PGAdvanceMap(pg=1.0 from=458 to=459)): created
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment