- rval = res_get (common_resource, "shadow");
- zebraIndexLock (rGroupDef.bfs, 1, rval);
- if (rval && *rval)
- bf_cache (rGroupDef.bfs, rval);
- else
- {
- logf (LOG_FATAL, "Cannot perform commit");
- logf (LOG_FATAL, "No shadow area defined");
- exit (1);
- }
- if (bf_commitExists (rGroupDef.bfs))
- {
- logf (LOG_LOG, "commit start");
- zebraIndexLockMsg ("c");
- zebraIndexWait (1);
- logf (LOG_LOG, "commit execute");
- bf_commitExec (rGroupDef.bfs);
-#ifndef WIN32
- sync ();
-#endif
- zebraIndexLockMsg ("d");
- zebraIndexWait (0);
- logf (LOG_LOG, "commit clean");
- bf_commitClean (rGroupDef.bfs, rval);
- }
- else
- logf (LOG_LOG, "nothing to commit");