From 7351c8424df316eb7da993af2bec381e98664cd6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Botond=20D=C3=A9nes?= Date: Thu, 27 Jul 2023 02:03:07 -0400 Subject: [PATCH] mutation/mutation_rebuilder: add comment about validity of returned mutation reference Closes #14853 --- mutation/mutation_rebuilder.hh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mutation/mutation_rebuilder.hh b/mutation/mutation_rebuilder.hh index 862ef28d12..22f6416b7d 100644 --- a/mutation/mutation_rebuilder.hh +++ b/mutation/mutation_rebuilder.hh @@ -18,6 +18,7 @@ class mutation_rebuilder { public: explicit mutation_rebuilder(schema_ptr s) : _s(std::move(s)) { } + // Returned reference is valid until consume_end_of_stream() or flush() is called. const mutation& consume_new_partition(const dht::decorated_key& dk) { assert(!_m); _m = mutation(_s, std::move(dk)); @@ -94,6 +95,7 @@ public: return std::move(mf).consume(*this); } public: + // Returned reference is valid until consume_end_of_stream() or flush() is called. const mutation& consume_new_partition(const dht::decorated_key& dk) { return _builder.consume_new_partition(dk); }