Commit da51d816 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 688b5118
...@@ -3466,7 +3466,6 @@ os_aio_array_reserve_slot( ...@@ -3466,7 +3466,6 @@ os_aio_array_reserve_slot(
} }
ut_ad(i < array->n_slots); 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 /* 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 a linear search of entire array. We are guaranteed to find a
...@@ -3482,6 +3481,8 @@ os_aio_array_reserve_slot( ...@@ -3482,6 +3481,8 @@ os_aio_array_reserve_slot(
/* We MUST always be able to get hold of a reserved slot. */ /* We MUST always be able to get hold of a reserved slot. */
ut_error; ut_error;
found: found:
array->cur_seg = (array->cur_seg + 1) % array->n_segments;
ut_ad(!slot->reserved); ut_ad(!slot->reserved);
array->n_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