[QUEUED scylladb next] api: Flush response output stream before closing

0 views
Skip to first unread message

Commit Bot

<bot@cloudius-systems.com>
unread,
Jun 30, 2024, 12:33:39 PMJun 30
to scylladb-dev@googlegroups.com, Pavel Emelyanov
From: Pavel Emelyanov <xe...@scylladb.com>
Committer: Pavel Emelyanov <xe...@scylladb.com>
Branch: next

api: Flush response output stream before closing

Otherwise close() may throw and this is what next patch will want not to
happen.

Signed-off-by: Pavel Emelyanov <xe...@scylladb.com>

---
diff --git a/api/storage_service.cc b/api/storage_service.cc
--- a/api/storage_service.cc
+++ b/api/storage_service.cc
@@ -1686,6 +1686,7 @@ void set_snapshot(http_context& ctx, routes& r, sharded<db::snapshot_ctl>& snap_
first = false;
}
co_await out.write("]");
+ co_await out.flush();
co_await out.close();
});
});

Commit Bot

<bot@cloudius-systems.com>
unread,
Jun 30, 2024, 12:34:15 PMJun 30
to scylladb-dev@googlegroups.com, Pavel Emelyanov
From: Pavel Emelyanov <xe...@scylladb.com>
Committer: Pavel Emelyanov <xe...@scylladb.com>
Branch: next

api: Flush response output stream before closing

The .close() method flushes the stream, but it may throw doing it. Next
patch will want .close() not to throw, for that stream must be flushed
explicitly before closing.

Signed-off-by: Pavel Emelyanov <xe...@scylladb.com>

---
diff --git a/api/task_manager.cc b/api/task_manager.cc
--- a/api/task_manager.cc
+++ b/api/task_manager.cc
@@ -151,6 +151,7 @@ void set_task_manager(http_context& ctx, routes& r, sharded<tasks::task_manager>
}
}
co_await s.write("]");
+ co_await s.flush();
co_await s.close();
};
co_return std::move(f);

Commit Bot

<bot@cloudius-systems.com>
unread,
Jun 30, 2024, 3:18:13 PMJun 30
to scylladb-dev@googlegroups.com, Pavel Emelyanov
From: Pavel Emelyanov <xe...@scylladb.com>
Committer: Pavel Emelyanov <xe...@scylladb.com>
Branch: master

api: Flush response output stream before closing

Otherwise close() may throw and this is what next patch will want not to
happen.

Signed-off-by: Pavel Emelyanov <xe...@scylladb.com>

---

Commit Bot

<bot@cloudius-systems.com>
unread,
Jun 30, 2024, 3:18:18 PMJun 30
to scylladb-dev@googlegroups.com, Pavel Emelyanov
From: Pavel Emelyanov <xe...@scylladb.com>
Committer: Pavel Emelyanov <xe...@scylladb.com>
Branch: master

api: Flush response output stream before closing

The .close() method flushes the stream, but it may throw doing it. Next
patch will want .close() not to throw, for that stream must be flushed
explicitly before closing.

Signed-off-by: Pavel Emelyanov <xe...@scylladb.com>

---

Commit Bot

<bot@cloudius-systems.com>
unread,
Jul 1, 2024, 3:48:05 AMJul 1
to scylladb-dev@googlegroups.com, Pavel Emelyanov
From: Pavel Emelyanov <xe...@scylladb.com>
Committer: Mergify <37929162+mergify[bot]@users.noreply.github.com>
Branch: next-6.0

api: Flush response output stream before closing

The .close() method flushes the stream, but it may throw doing it. Next
patch will want .close() not to throw, for that stream must be flushed
explicitly before closing.

Signed-off-by: Pavel Emelyanov <xe...@scylladb.com>
(cherry picked from commit 4897d8f14588209674ae797b251e0c6f42f8bef3)

---
diff --git a/api/task_manager.cc b/api/task_manager.cc
--- a/api/task_manager.cc
+++ b/api/task_manager.cc
@@ -153,6 +153,7 @@ void set_task_manager(http_context& ctx, routes& r, sharded<tasks::task_manager>

Commit Bot

<bot@cloudius-systems.com>
unread,
Jul 1, 2024, 3:48:11 AMJul 1
to scylladb-dev@googlegroups.com, Pavel Emelyanov
From: Pavel Emelyanov <xe...@scylladb.com>
Committer: Mergify <37929162+mergify[bot]@users.noreply.github.com>
Branch: next-6.0

api: Flush response output stream before closing

Otherwise close() may throw and this is what next patch will want not to
happen.

Signed-off-by: Pavel Emelyanov <xe...@scylladb.com>
(cherry picked from commit d1fd8866082d1e7b6ece6d24e16db44324b9e59c)

---
diff --git a/api/storage_service.cc b/api/storage_service.cc
--- a/api/storage_service.cc
+++ b/api/storage_service.cc
@@ -1710,6 +1710,7 @@ void set_snapshot(http_context& ctx, routes& r, sharded<db::snapshot_ctl>& snap_

Commit Bot

<bot@cloudius-systems.com>
unread,
Jul 1, 2024, 6:12:59 AMJul 1
to scylladb-dev@googlegroups.com, Pavel Emelyanov
From: Pavel Emelyanov <xe...@scylladb.com>
Committer: Mergify <37929162+mergify[bot]@users.noreply.github.com>
Branch: branch-6.0

api: Flush response output stream before closing

The .close() method flushes the stream, but it may throw doing it. Next
patch will want .close() not to throw, for that stream must be flushed
explicitly before closing.

Signed-off-by: Pavel Emelyanov <xe...@scylladb.com>

Commit Bot

<bot@cloudius-systems.com>
unread,
Jul 1, 2024, 6:13:06 AMJul 1
to scylladb-dev@googlegroups.com, Pavel Emelyanov
From: Pavel Emelyanov <xe...@scylladb.com>
Committer: Mergify <37929162+mergify[bot]@users.noreply.github.com>
Branch: branch-6.0

api: Flush response output stream before closing

Otherwise close() may throw and this is what next patch will want not to
happen.

Signed-off-by: Pavel Emelyanov <xe...@scylladb.com>

Commit Bot

<bot@cloudius-systems.com>
unread,
Jul 1, 2024, 11:03:28 AMJul 1
to scylladb-dev@googlegroups.com, Pavel Emelyanov
From: Pavel Emelyanov <xe...@scylladb.com>
Committer: Pavel Emelyanov <xe...@scylladb.com>
Branch: next-5.4

api: Flush response output stream before closing

The .close() method flushes the stream, but it may throw doing it. Next
patch will want .close() not to throw, for that stream must be flushed
explicitly before closing.

Signed-off-by: Pavel Emelyanov <xe...@scylladb.com>
(cherry picked from commit 4897d8f14588209674ae797b251e0c6f42f8bef3)

---
diff --git a/api/task_manager.cc b/api/task_manager.cc
--- a/api/task_manager.cc
+++ b/api/task_manager.cc
@@ -151,6 +151,7 @@ void set_task_manager(http_context& ctx, routes& r, db::config& cfg) {
Reply all
Reply to author
Forward
0 new messages