Skip to content

Commit 8814a22

Browse files
committed
Comments on chaser operation while suspended.
1 parent 557557b commit 8814a22

File tree

6 files changed

+9
-0
lines changed

6 files changed

+9
-0
lines changed

src/chasers/chaser_confirm.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ bool chaser_confirm::handle_event(const code&, chase event_,
6565
return false;
6666

6767
// Stop generating query during suspension.
68+
// Incoming events may already be flushed to the strand at this point.
6869
if (suspended())
6970
return true;
7071

@@ -221,6 +222,7 @@ void chaser_confirm::organize(header_states& fork, const header_links& popped,
221222
auto& query = archive();
222223
auto height = add1(fork_point);
223224

225+
// Continue when suspended as write error terminates synchronous loop.
224226
for (const auto& state: fork)
225227
{
226228
switch (state.ec.value())
@@ -238,6 +240,7 @@ void chaser_confirm::organize(header_states& fork, const header_links& popped,
238240
}
239241
case database::error::block_valid:
240242
{
243+
// False always sets a store fault (including for disk full).
241244
if (!confirm_block(state.link, height, popped, fork_point))
242245
return;
243246

src/chasers/chaser_snapshot.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ bool chaser_snapshot::handle_event(const code&, chase event_,
7979
return false;
8080

8181
// Stop generating query during suspension.
82+
// Incoming events may already be flushed to the strand at this point.
8283
if (suspended())
8384
return true;
8485

src/chasers/chaser_template.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ bool chaser_template::handle_event(const code&, chase event_,
5757
return false;
5858

5959
// Stop generating query during suspension.
60+
// Incoming events may already be flushed to the strand at this point.
6061
if (suspended())
6162
return true;
6263

src/chasers/chaser_transaction.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ bool chaser_transaction::handle_event(const code&, chase event_,
5858

5959
// TODO: allow required messages.
6060
////// Stop generating query during suspension.
61+
////// Incoming events may already be flushed to the strand at this point.
6162
////if (suspended())
6263
//// return true;
6364

src/chasers/chaser_validate.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ bool chaser_validate::handle_event(const code&, chase event_,
6767
return false;
6868

6969
// Stop generating query during suspension.
70+
// Incoming events may already be flushed to the strand at this point.
7071
if (suspended())
7172
return true;
7273

@@ -161,6 +162,7 @@ void chaser_validate::do_bumped(height_t height) NOEXCEPT
161162
const auto& query = archive();
162163

163164
// Bypass until next event if validation backlog is full.
165+
// Stop when suspended as write error des not terminate asynchronous loop.
164166
while ((backlog_ < maximum_backlog_) && !closed() && !suspended())
165167
{
166168
const auto link = query.to_candidate(height);

src/full_node.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,7 @@ void full_node::fault(const code& ec) NOEXCEPT
379379
LOGF("Node fault, " << ec.message());
380380
}
381381

382+
// If a call does not get all of the channels, subsequent failures do so.
382383
suspend(ec);
383384
}
384385

0 commit comments

Comments
 (0)