Esempio n. 1
0
void
obj_sync(void)
{
	WT_SESSION *session;
	int ret;

	if ((ret = conn->open_session(conn, NULL, NULL, &session)) != 0)
		die("conn.session", ret);

	if ((ret = session->sync(session, uri, NULL)) != 0)
		if (ret != ENOENT)
			die("session.sync", ret);

	if ((ret = session->close(session, NULL)) != 0)
		die("session.close", ret);
}
Esempio n. 2
0
/*
 * wt_shutdown --
 *	Flush the file to disk and shut down the WiredTiger connection.
 */
static void
wt_shutdown(void)
{
	WT_SESSION *session;
	int ret;

	if ((ret = conn->open_session(conn, NULL, NULL, &session)) != 0)
		die("conn.session", ret);

	if ((ret = session->verify(session, FNAME, NULL)) != 0)
		die("session.verify", ret);

	if ((ret = session->sync(session, FNAME, NULL)) != 0)
		die("session.sync", ret);

	if ((ret = conn->close(conn, NULL)) != 0)
		die("conn.close", ret);
}
Esempio n. 3
0
static void
wts_sync(void)
{
	WT_CONNECTION *conn;
	WT_SESSION *session;
	int ret;

	conn = g.wts_conn;

	track("sync", 0ULL, NULL);

	if ((ret = conn->open_session(conn, NULL, NULL, &session)) != 0)
		die(ret, "connection.open_session");
	if ((ret = session->sync(
	    session, WT_TABLENAME, NULL)) != 0 && ret != EBUSY)
		die(ret, "session.sync: %s", WT_TABLENAME);
	if ((ret = session->close(session, NULL)) != 0)
		die(ret, "session.close");
}