trans_logger: use kb as replay limiter units

This commit is contained in:
Thomas Schoebel-Theuer 2013-07-15 12:14:36 +02:00
parent 61e5d30757
commit 22d4516d21
1 changed files with 1 additions and 1 deletions

View File

@ -2912,7 +2912,7 @@ void trans_logger_replay(struct trans_logger_brick *brick)
MARS_IO("ignoring pos = %lld len = %d code = %d\n", lh.l_pos, lh.l_len, lh.l_code);
} else if (likely(buf && len)) {
if (brick->replay_limiter)
mars_limit_sleep(brick->replay_limiter, len);
mars_limit_sleep(brick->replay_limiter, (len - 1) / 1024 + 1);
status = apply_data(brick, lh.l_pos, buf, len);
MARS_RPL("apply %lld %lld (pos=%lld status=%d)\n", finished_pos, new_finished_pos, lh.l_pos, status);
if (unlikely(status < 0)) {