Commit 43df9e48 authored by Zardosht Kasheff's avatar Zardosht Kasheff Committed by Yoni Fogel
Browse files

[t:4541], merge to main

git-svn-id: file:///svn/toku/tokudb@41538 c7de825b-a66e-492c-adef-691d508d4ae1
parent db21ce8e
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -422,7 +422,9 @@ static void print_db_struct (void) {
			 "const DBT* (*dbt_neg_infty)(void)/* Return the special DBT that refers to negative infinity in the lock table.*/",
			 "void (*get_max_row_size) (DB*, u_int32_t *max_key_size, u_int32_t *max_row_size)",
			 "DESCRIPTOR descriptor /* saved row/dictionary descriptor for aiding in comparisons */",
			 "DESCRIPTOR cmp_descriptor /* saved row/dictionary descriptor for aiding in comparisons */",
			 "int (*change_descriptor) (DB*, DB_TXN*, const DBT* descriptor, u_int32_t) /* change row/dictionary descriptor for a db.  Available only while db is open */",
			 "int (*update_cmp_descriptor) (DB*) /* Update cmp descriptor.  Available only while db is open */",
			 "int (*getf_set)(DB*, DB_TXN*, u_int32_t, DBT*, YDB_CALLBACK_FUNCTION, void*) /* same as DBC->c_getf_set without a persistent cursor) */",
			 "int (*optimize)(DB*) /* Run garbage collecion and promote all transactions older than oldest. Amortized (happens during flattening) */",
			 "int (*hot_optimize)(DB*, int (*progress_callback)(void *progress_extra, float progress), void *progress_extra)",
+2 −0
Original line number Diff line number Diff line
@@ -303,7 +303,9 @@ struct __toku_db {
  const DBT* (*dbt_neg_infty)(void)/* Return the special DBT that refers to negative infinity in the lock table.*/;
  void (*get_max_row_size) (DB*, u_int32_t *max_key_size, u_int32_t *max_row_size);
  DESCRIPTOR descriptor /* saved row/dictionary descriptor for aiding in comparisons */;
  DESCRIPTOR cmp_descriptor /* saved row/dictionary descriptor for aiding in comparisons */;
  int (*change_descriptor) (DB*, DB_TXN*, const DBT* descriptor, u_int32_t) /* change row/dictionary descriptor for a db.  Available only while db is open */;
  int (*update_cmp_descriptor) (DB*) /* Update cmp descriptor.  Available only while db is open */;
  int (*getf_set)(DB*, DB_TXN*, u_int32_t, DBT*, YDB_CALLBACK_FUNCTION, void*) /* same as DBC->c_getf_set without a persistent cursor) */;
  int (*optimize)(DB*) /* Run garbage collecion and promote all transactions older than oldest. Amortized (happens during flattening) */;
  int (*hot_optimize)(DB*, int (*progress_callback)(void *progress_extra, float progress), void *progress_extra);
+4 −4
Original line number Diff line number Diff line
@@ -311,7 +311,7 @@ ctm_pick_child(struct brt_header *h,
        childnum = toku_brtnode_which_child(
            parent,
            &ctme->target_key,
            &h->descriptor,
            &h->cmp_descriptor,
            h->compare_fun);
    }
    return childnum;
@@ -1074,7 +1074,7 @@ flush_this_child(
    set_BNC(node, childnum, toku_create_empty_nl());

    // now we have a bnc to flush to the child
    r = toku_bnc_flush_to_child(h->compare_fun, h->update_fun, &h->descriptor, h->cf, bnc, child); assert_zero(r);
    r = toku_bnc_flush_to_child(h->compare_fun, h->update_fun, &h->cmp_descriptor, h->cf, bnc, child); assert_zero(r);
    destroy_nonleaf_childinfo(bnc);
}

@@ -1567,7 +1567,7 @@ flush_some_child(
        r = toku_bnc_flush_to_child(
            h->compare_fun,
            h->update_fun,
            &h->descriptor,
            &h->cmp_descriptor,
            h->cf,
            bnc,
            child
@@ -1729,7 +1729,7 @@ static void flush_node_fun(void *fe_v)
        r = toku_bnc_flush_to_child(
            fe->h->compare_fun,
            fe->h->update_fun,
            &fe->h->descriptor,
            &fe->h->cmp_descriptor,
            fe->h->cf,
            fe->bnc,
            fe->node
+1 −1
Original line number Diff line number Diff line
@@ -122,7 +122,7 @@ hot_just_pick_child(struct brt_header *h,
        // Find the pivot boundary.
        childnum = toku_brtnode_hot_next_child(parent,
                                               &flusher->highest_pivot_key,
                                               &h->descriptor,
                                               &h->cmp_descriptor,
                                               h->compare_fun);
    }

+1 −3
Original line number Diff line number Diff line
@@ -386,9 +386,7 @@ struct brt_header {
    BLOCKNUM root_blocknum;            // roots of the dictionary
    unsigned int flags;
    DESCRIPTOR_S descriptor;

    int free_me_count;                 // Descriptors are freed asynchronously, so we cannot free() them.
    void **free_me;                    // Instead we just accumulate them in this array.  These are void* that we must free() later.
    DESCRIPTOR_S cmp_descriptor;

    BLOCK_TABLE blocktable;
    // If a transaction created this BRT, which one?
Loading