Commit dfe5a2c5 authored by inaam's avatar inaam

branches/innodb+

Fix an error in the IO request array slot reservation.
Increment cur_seg each time instead of doing it only when the request
cannot be serviced from it. This ensures truly round robin allocation
of incoming IO requests.

parent c1c40710
......@@ -3466,7 +3466,6 @@ os_aio_array_reserve_slot(
}
ut_ad(i < array->n_slots);
array->cur_seg = (array->cur_seg + 1) % array->n_segments;
/* If we are unable to find a slot in our desired segment we do
a linear search of entire array. We are guaranteed to find a
......@@ -3482,6 +3481,8 @@ os_aio_array_reserve_slot(
/* We MUST always be able to get hold of a reserved slot. */
ut_error;
found:
array->cur_seg = (array->cur_seg + 1) % array->n_segments;
ut_ad(!slot->reserved);
array->n_reserved++;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment