Fix destructive verify output bug
authorJakob Cornell <jakob+gpg@jcornell.net>
Wed, 20 Apr 2022 18:11:16 +0000 (13:11 -0500)
committerJakob Cornell <jakob+gpg@jcornell.net>
Wed, 20 Apr 2022 18:11:16 +0000 (13:11 -0500)
disk_jumble/src/disk_jumble/verify.py

index 02a3368709d9161b32df2498d00e105f2d3ae6ec..e34494e98cf796e056b3ef99af83d056fc1de795 100644 (file)
@@ -357,11 +357,11 @@ def _do_verify(conn, disk_id: int, target_ranges: List[range], disk_file: io.Buf
                """
                        with
                                new_passes as (
-                                       select range_agg(range) as new_passes
+                                       select coalesce(range_agg(range), int8multirange()) as new_passes
                                        from unnest(%(pass_ranges)s::int8range[]) as range
                                ),
                                new_fails as (
-                                       select range_agg(range) as new_fails
+                                       select coalesce(range_agg(range), int8multirange()) as new_fails
                                        from unnest(%(fail_ranges)s::int8range[]) as range
                                )
                        update diskjumble.disk_maps