We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5a359b7 commit f950916Copy full SHA for f950916
1 file changed
src/RecordComponent.cpp
@@ -487,13 +487,17 @@ void RecordComponent::flush(
487
{
488
return;
489
}
490
- if (access::readOnly(IOHandler()->m_frontendAccess) &&
491
- flush_level::global_flushpoint(flushParams.flushLevel))
+ if (access::readOnly(IOHandler()->m_frontendAccess))
492
493
- while (!rc.m_chunks.empty())
+ // sic! this needs to be a separate if term, otherwise flushes may
+ // wrongly jump into the write branch below
494
+ if (flush_level::global_flushpoint(flushParams.flushLevel))
495
- IOHandler()->enqueue(rc.m_chunks.front());
496
- rc.m_chunks.pop();
+ while (!rc.m_chunks.empty())
497
+ {
498
+ IOHandler()->enqueue(rc.m_chunks.front());
499
+ rc.m_chunks.pop();
500
+ }
501
502
503
else
0 commit comments