[QUEUED scylladb next] api: Fix indentation after previous patch

0 views
Skip to first unread message

Commit Bot

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

api: Fix indentation after previous patch

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
@@ -1662,37 +1662,37 @@ void set_snapshot(http_context& ctx, routes& r, sharded<db::snapshot_ctl>& snap_
ss::get_snapshot_details.set(r, [&snap_ctl](std::unique_ptr<http::request> req) -> future<json::json_return_type> {
auto result = co_await snap_ctl.local().get_snapshot_details();
co_return std::function([res = std::move(result)] (output_stream<char>&& o) -> future<> {
- std::exception_ptr ex;
- output_stream<char> out = std::move(o);
- try {
- auto result = std::move(res);
- bool first = true;
-
- co_await out.write("[");
- for (auto& [name, details] : result) {
- if (!first) {
- co_await out.write(", ");
- }
- std::vector<ss::snapshot> snapshot;
- for (auto& cf : details) {
- ss::snapshot snp;
- snp.ks = cf.ks;
- snp.cf = cf.cf;
- snp.live = cf.details.live;
- snp.total = cf.details.total;
- snapshot.push_back(std::move(snp));
+ std::exception_ptr ex;
+ output_stream<char> out = std::move(o);
+ try {
+ auto result = std::move(res);
+ bool first = true;
+
+ co_await out.write("[");
+ for (auto& [name, details] : result) {
+ if (!first) {
+ co_await out.write(", ");
+ }
+ std::vector<ss::snapshot> snapshot;
+ for (auto& cf : details) {
+ ss::snapshot snp;
+ snp.ks = cf.ks;
+ snp.cf = cf.cf;
+ snp.live = cf.details.live;
+ snp.total = cf.details.total;
+ snapshot.push_back(std::move(snp));
+ }
+ ss::snapshots all_snapshots;
+ all_snapshots.key = name;
+ all_snapshots.value = std::move(snapshot);
+ co_await all_snapshots.write(out);
+ first = false;
}
- ss::snapshots all_snapshots;
- all_snapshots.key = name;
- all_snapshots.value = std::move(snapshot);
- co_await all_snapshots.write(out);
- first = false;
+ co_await out.write("]");
+ co_await out.flush();
+ } catch (...) {
+ ex = std::current_exception();
}
- co_await out.write("]");
- co_await out.flush();
- } catch (...) {
- ex = std::current_exception();
- }
co_await out.close();
if (ex) {
co_await coroutine::return_exception_ptr(std::move(ex));

Commit Bot

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

api: Fix indentation after previous patch

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
@@ -141,23 +141,23 @@ void set_task_manager(http_context& ctx, routes& r, sharded<tasks::task_manager>
std::function<future<>(output_stream<char>&&)> f = [r = std::move(res)] (output_stream<char>&& os) -> future<> {
auto s = std::move(os);
std::exception_ptr ex;
- try {
- auto res = std::move(r);
- co_await s.write("[");
- std::string delim = "";
- for (auto& v: res) {
- for (auto& stats: v) {
- co_await s.write(std::exchange(delim, ", "));
- tm::task_stats ts;
- ts = stats;
- co_await formatter::write(s, ts);
+ try {
+ auto res = std::move(r);
+ co_await s.write("[");
+ std::string delim = "";
+ for (auto& v: res) {
+ for (auto& stats: v) {
+ co_await s.write(std::exchange(delim, ", "));
+ tm::task_stats ts;
+ ts = stats;
+ co_await formatter::write(s, ts);
+ }
}
+ co_await s.write("]");
+ co_await s.flush();
+ } catch (...) {
+ ex = std::current_exception();
}
- co_await s.write("]");
- co_await s.flush();
- } catch (...) {
- ex = std::current_exception();
- }
co_await s.close();

Commit Bot

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

api: Fix indentation after previous patch

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

---
+ } catch (...) {
+ ex = std::current_exception();
}
- co_await out.write("]");
- co_await out.flush();
- } catch (...) {
- ex = std::current_exception();
- }
co_await out.close();

Commit Bot

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

api: Fix indentation after previous patch

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

---
+ } catch (...) {
+ ex = std::current_exception();
}
- co_await s.write("]");
- co_await s.flush();
- } catch (...) {
- ex = std::current_exception();
- }
co_await s.close();

Commit Bot

<bot@cloudius-systems.com>
unread,
Jul 1, 2024, 3:48:10 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: Fix indentation after previous patch

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

---
diff --git a/api/task_manager.cc b/api/task_manager.cc
--- a/api/task_manager.cc
+++ b/api/task_manager.cc
@@ -143,23 +143,23 @@ 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:13 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: Fix indentation after previous patch

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

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

Commit Bot

<bot@cloudius-systems.com>
unread,
Jul 1, 2024, 6:13:03 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: Fix indentation after previous patch

Signed-off-by: Pavel Emelyanov <xe...@scylladb.com>
+ } catch (...) {
+ ex = std::current_exception();
}
- co_await s.write("]");
- co_await s.flush();
- } catch (...) {
- ex = std::current_exception();
- }
co_await s.close();

Commit Bot

<bot@cloudius-systems.com>
unread,
Jul 1, 2024, 6:13:08 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: Fix indentation after previous patch

Signed-off-by: Pavel Emelyanov <xe...@scylladb.com>
+ } catch (...) {
+ ex = std::current_exception();
}
- co_await out.write("]");
- co_await out.flush();
- } catch (...) {
- ex = std::current_exception();
- }
co_await out.close();

Commit Bot

<bot@cloudius-systems.com>
unread,
Jul 1, 2024, 11:03:31 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: Fix indentation after previous patch

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

---
diff --git a/api/task_manager.cc b/api/task_manager.cc
--- a/api/task_manager.cc
+++ b/api/task_manager.cc
@@ -141,23 +141,23 @@ void set_task_manager(http_context& ctx, routes& r, db::config& cfg) {
+ } catch (...) {
+ ex = std::current_exception();
}
- co_await s.write("]");
- co_await s.flush();
- } catch (...) {
- ex = std::current_exception();
- }
co_await s.close();
Reply all
Reply to author
Forward
0 new messages