+ BDBStore *store = (BDBStore *)data;
+ DB_TXN *txn = NULL;
+
+ // Number of operations in the current transaction
+ int transaction_size = 0;
+
+ while (TRUE) {
+ int res;
+ BlueSkyStoreAsync *async;
+
+ if (txn == NULL) {
+ res = store->env->txn_begin(store->env, NULL, &txn, 0);
+ if (res != 0) {
+ fprintf(stderr, "Unable to begin transaction!\n");
+ return NULL;
+ }
+ }