Lines Matching refs:commit
207 dlog(LOG_ERR, "commit-destroy: %s", strerror(errno));
211 dlog(LOG_ERR, "commit-create: %s", strerror(errno));
251 /* we already have one commit in progress, skip this. The clientfd
253 if (clientfd && STATE_SYNC(commit).clientfd != -1)
256 switch(STATE_SYNC(commit).state) {
258 gettimeofday(&STATE_SYNC(commit).stats.start, NULL);
259 STATE_SYNC(commit).stats.ok = c->stats.commit_ok;
260 STATE_SYNC(commit).stats.fail = c->stats.commit_fail;
261 STATE_SYNC(commit).clientfd = clientfd;
263 STATE_SYNC(commit).current =
265 STATE_SYNC(commit).current,
268 if (STATE_SYNC(commit).current < CONFIG(hashsize)) {
269 STATE_SYNC(commit).state = COMMIT_STATE_MASTER;
271 write_evfd(STATE_SYNC(commit).evfd);
274 STATE_SYNC(commit).current = 0;
275 STATE_SYNC(commit).state = COMMIT_STATE_RELATED;
277 STATE_SYNC(commit).current =
279 STATE_SYNC(commit).current,
282 if (STATE_SYNC(commit).current < CONFIG(hashsize)) {
283 STATE_SYNC(commit).state = COMMIT_STATE_RELATED;
285 write_evfd(STATE_SYNC(commit).evfd);
288 /* calculate the time that commit has taken */
290 timersub(&commit_stop, &STATE_SYNC(commit).stats.start, &res);
293 commit_ok = c->stats.commit_ok - STATE_SYNC(commit).stats.ok;
295 c->stats.commit_fail - STATE_SYNC(commit).stats.fail;
304 dlog(LOG_NOTICE, "commit has taken %lu.%06lu seconds",
308 STATE_SYNC(commit).current = 0;
309 STATE_SYNC(commit).state = COMMIT_STATE_INACTIVE;
330 .commit = NULL,
342 .commit = cache_ct_commit,
354 .commit = NULL,