Files
neon/pageserver
Christian Schwarz 11c18b05aa push metadata.to_bytes() out of stop() into persist_index_part_with_deleted_flag()
This pushes the (unlikely) possibility of failure to serialize metadata
out of stop().
That in turn leaves us with only one case of how stop() can fail.
There are two callsites of stop():
1. perform_upload_task: here, we can safely say "unreachable", and I
   think any future refactorings that might violate that invariant
   would notice, because the unreachable!() is close to the code that
   would likely be refactored.
   The unreachable!() is desirable there because otherwise we'd need to
   think about how to handle the error. Maybe the previous code would
   have done the right thing, maybe not.

2. delete_timeline: this is the new one, and, it's far away from the
   code that initializes the upload queue. Putting an unreachable!()
   there seems risky. So, bail out with an error. It will become a 500
   status code, which console shall retry according to the openapi spec.
   We have test coverage that the retry can succeed.
2023-04-27 18:33:40 +02:00
..