-
Sujatha Sivakumar authored
BINLOG_GROUP_COMMIT_SYNC_DELAY IS SET TO [1-9] Problem: ======= When binlog_group_commit_sync_delay is set to [1-9]: 1) If binlog_group_commit_sync_no_delay_count > 1, and the number of transaction commits is less than binlog_group_commit_sync_no_delay_count, these commits will hang forever if no more commits come in; 2) If binlog_group_commit_sync_no_delay_count = 0, all transaction commits will hang forever; Analysis: ========= Setting binlog_group_commit_sync_no_delay_count option means that the server exits the wait procedure if the number of sessions reaches the count given before the timeout i.e is set in binlog_group_commit_sync_delay elapses. In order to check if session count has reached the given limit, the waiting time is broken into small intervals called as delta. The delta is calculated as 1/10 of total wait time. After each delta waiting time is elapsed queue size is checked to see if count has reached. If count is not reached then wait_time= wait_time - delta. This process is repeated until wait_time > 0 and count has not been reached. If the wait_time is set to [1-9] then the delta will become 0. If number of transaction commits is less than the count and the delta is '0' then wait_time = wait_time - delta will be a no-op. This will cause the commits to hang as the wait will never end. Fix: === Have '1' as the minimum delta value, i.e max(1, wait_time * 0.1) is set as delta. If 1 > (wait_time * 0.1) then delta=1 other wise delta= (wait_time * 0.1).
Sujatha Sivakumar authoredBINLOG_GROUP_COMMIT_SYNC_DELAY IS SET TO [1-9] Problem: ======= When binlog_group_commit_sync_delay is set to [1-9]: 1) If binlog_group_commit_sync_no_delay_count > 1, and the number of transaction commits is less than binlog_group_commit_sync_no_delay_count, these commits will hang forever if no more commits come in; 2) If binlog_group_commit_sync_no_delay_count = 0, all transaction commits will hang forever; Analysis: ========= Setting binlog_group_commit_sync_no_delay_count option means that the server exits the wait procedure if the number of sessions reaches the count given before the timeout i.e is set in binlog_group_commit_sync_delay elapses. In order to check if session count has reached the given limit, the waiting time is broken into small intervals called as delta. The delta is calculated as 1/10 of total wait time. After each delta waiting time is elapsed queue size is checked to see if count has reached. If count is not reached then wait_time= wait_time - delta. This process is repeated until wait_time > 0 and count has not been reached. If the wait_time is set to [1-9] then the delta will become 0. If number of transaction commits is less than the count and the delta is '0' then wait_time = wait_time - delta will be a no-op. This will cause the commits to hang as the wait will never end. Fix: === Have '1' as the minimum delta value, i.e max(1, wait_time * 0.1) is set as delta. If 1 > (wait_time * 0.1) then delta=1 other wise delta= (wait_time * 0.1).
Loading