Commit 38376b57 authored by Bradley C. Kuszmaul's avatar Bradley C. Kuszmaul

Get rid of broken printfs. Addresses #27.

git-svn-id: file:///svn/tokudb@1984 c7de825b-a66e-492c-adef-691d508d4ae1
parent c3d806c6
...@@ -846,10 +846,8 @@ int toku_pma_insert_or_replace (PMA pma, DBT *k, DBT *v, ...@@ -846,10 +846,8 @@ int toku_pma_insert_or_replace (PMA pma, DBT *k, DBT *v,
//printf("%s:%d v->size=%d\n", __FILE__, __LINE__, v->size); //printf("%s:%d v->size=%d\n", __FILE__, __LINE__, v->size);
int r; int r;
int found; int found;
int traceit = toku_txn_get_last_lsn(txn).lsn>=3836455 && toku_txn_get_last_lsn(txn).lsn<=3836460;
unsigned int idx = pma_search(pma, k, pma->dup_mode & TOKU_DB_DUPSORT ? v : 0, 0, pma->N, &found); unsigned int idx = pma_search(pma, k, pma->dup_mode & TOKU_DB_DUPSORT ? v : 0, 0, pma->N, &found);
if (found) { if (found) {
if (traceit) printf("%s:%d Already present at lsn %" PRIu64 "\n", __FILE__, __LINE__, toku_txn_get_last_lsn(txn).lsn);
struct kv_pair *kv = pma->pairs[idx]; struct kv_pair *kv = pma->pairs[idx];
*replaced_v_size = kv->vallen; *replaced_v_size = kv->vallen;
*fingerprint -= rand4fingerprint*toku_calccrc32_kvpair(kv_pair_key_const(kv), kv_pair_keylen(kv), kv_pair_val_const(kv), kv_pair_vallen(kv)); *fingerprint -= rand4fingerprint*toku_calccrc32_kvpair(kv_pair_key_const(kv), kv_pair_keylen(kv), kv_pair_val_const(kv), kv_pair_vallen(kv));
...@@ -872,7 +870,6 @@ int toku_pma_insert_or_replace (PMA pma, DBT *k, DBT *v, ...@@ -872,7 +870,6 @@ int toku_pma_insert_or_replace (PMA pma, DBT *k, DBT *v,
} }
if (kv_pair_inuse(pma->pairs[idx])) { if (kv_pair_inuse(pma->pairs[idx])) {
unsigned int newidx; unsigned int newidx;
if (traceit) printf("%s:%d inuse\n", __FILE__, __LINE__);
r = toku_pmainternal_make_space_at (txn, filenum, diskoff, pma, idx, &newidx, node_lsn); /* returns the new idx. */ r = toku_pmainternal_make_space_at (txn, filenum, diskoff, pma, idx, &newidx, node_lsn); /* returns the new idx. */
if (r!=0) return r; if (r!=0) return r;
idx=newidx; idx=newidx;
...@@ -889,7 +886,6 @@ int toku_pma_insert_or_replace (PMA pma, DBT *k, DBT *v, ...@@ -889,7 +886,6 @@ int toku_pma_insert_or_replace (PMA pma, DBT *k, DBT *v,
const struct kv_pair *pair = pma->pairs[idx]; const struct kv_pair *pair = pma->pairs[idx];
const BYTESTRING key = { pair->keylen, (char*)kv_pair_key_const(pair) }; const BYTESTRING key = { pair->keylen, (char*)kv_pair_key_const(pair) };
const BYTESTRING data = { pair->vallen, (char*)kv_pair_val_const(pair) }; const BYTESTRING data = { pair->vallen, (char*)kv_pair_val_const(pair) };
if (traceit) printf("%s:%d inserting\n", __FILE__, __LINE__);
r = toku_log_insertinleaf (txn, toku_txn_get_txnid(txn), pma->filenum, diskoff, idx, key, data); r = toku_log_insertinleaf (txn, toku_txn_get_txnid(txn), pma->filenum, diskoff, idx, key, data);
if (txn && node_lsn) *node_lsn = toku_txn_get_last_lsn(txn); if (txn && node_lsn) *node_lsn = toku_txn_get_last_lsn(txn);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment