Repository navigation
Conversation
|
I think interval_wait_count only increase cause the issue |
|
anybody here ? |
|
@qiuxinyidian can you please explain what this fixes? it's not obvious from the commit message or the tracker issue |
|
int RGWCoroutinesManager::run(const DoutPrefixProvider *dpp, list<RGWCoroutinesStack *> &stacks) call handle_unblocked_stack to deal unblocked stack, while in RGWCoroutinesManager::run( interval_wait_count only increase even overflow , blocked_count des in handle_unblocked_stack,so may cause not call handle_unblocked_stack |
|
if some unblocked stack not deal with ,may cause multisite data not sync |
cbodley
left a comment
There was a problem hiding this comment.
thanks a lot for the explanation, the fix looks sensible
| if (stack->is_interval_waiting()) { | ||
| --(*interval_wait_count); | ||
| } |
There was a problem hiding this comment.
nesting this inside of the is_io_blocked() block assumes that interval_waits will always be io_blocked. this appears to be the case for RGWCoroutinesStack::wait(), but maybe this logic should treat them independently?
if (stack->is_io_blocked()) {
--(*blocked_count);
stack->set_io_blocked(false);
}
+ if (stack->is_interval_waiting()) {
+ --(*interval_wait_count);
+ stack->set_interval_wait(false);
+ }
- stack->set_interval_wait(false);There was a problem hiding this comment.
Maybe, at present , the code shows interval_wait is one of scene of io_block
There was a problem hiding this comment.
RGWCoroutinesManager::run.
if (stack->is_io_blocked())
{
ldout(cct, 20) << __func__ << ":"
<< " stack=" << (void *)stack << " is io blocked" << dendl;
if (stack->is_interval_waiting())
{
interval_wait_count++;
}
blocked_count++;
}
may this logic should treat them independently ?
There was a problem hiding this comment.
@smanjara i do think that comment is consistent with the blocked_count - interval_wait_count logic in the while loop directly below - and that logic depends on tracking interval_wait_count accurately, which this PR addresses
that said, i have no idea why that loop needs special handling for interval waits
There was a problem hiding this comment.
@cbodley there seems to be one case where we want to call handle_unblocked_stack() only on blocked operations without the interval_wait. Like in
Line 717 in 8669e4d
In this case, we should probably not decrement interval_wait_count?
in
void RGWCoroutinesManager::handle_unblocked_stack(set<RGWCoroutinesStack *> &context_stacks, list<RGWCoroutinesStack *> &scheduled_stacks,
RGWCompletionManager::io_completion &io, int *blocked_count)
{
ceph_assert(ceph_mutex_is_wlocked(lock));
RGWCoroutinesStack *stack = static_cast<RGWCoroutinesStack *>(io.user_info);
if (context_stacks.find(stack) == context_stacks.end())
{
return;
}
if (!stack->try_io_unblock(io.io_id))
{
return;
}
if (stack->is_io_blocked())
{
--(*blocked_count);
stack->set_io_blocked(false);
}
stack->set_interval_wait(false);
if (!stack->is_done())
{
if (!stack->is_scheduled)
{
scheduled_stacks.push_back(stack);
stack->set_is_scheduled(true);
}
}
else
{
context_stacks.erase(stack);
stack->put();
}
}
call stack->set_interval_wait(false) to change stack state to not_interval_wait, should dec interval_wait_count?
|
@cbodley how relevant is this PR to current downstream work? |
|
@mattbenjamin the fix applies to pacific/quincy too so it's worth testing |
|
check, I will tests under load |
if interval_wait_count overflow , blocked_count is small value, and blocked_count - interval_wait_count >= ops_window, |
Fixes: https://tracker.ceph.com/issues/57853
Signed-off-by: zhipeng li [email protected]
Contribution Guidelines
To sign and title your commits, please refer to Submitting Patches to Ceph.
If you are submitting a fix for a stable branch (e.g. "pacific"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.
Checklist
Show available Jenkins commands
jenkins retest this pleasejenkins test classic perfjenkins test crimson perfjenkins test signedjenkins test make checkjenkins test make check arm64jenkins test submodulesjenkins test dashboardjenkins test dashboard cephadmjenkins test apijenkins test docsjenkins render docsjenkins test ceph-volume alljenkins test ceph-volume toxjenkins test windows