fix deadlock on shutdown; be more stingy with bloom filter RAM with small indexes, add bloom filter to c2, default back to old buffer manager
git-svn-id: svn+ssh://svn.corp.yahoo.com/yahoo/yrl/labs/pnuts/code/logstore@1468 8dad8b1f-cf64-0410-95b6-bcf113ffbcfe
This commit is contained in:
parent
79936da79b
commit
a8e905c0d6
3 changed files with 13 additions and 10 deletions
|
@ -33,7 +33,7 @@ logtable<TUPLE>::logtable(pageid_t internal_region_size, pageid_t datapage_regio
|
|||
tree_c2 = NULL;
|
||||
// This bool is purely for external code.
|
||||
this->accepting_new_requests = true;
|
||||
this->still_running_ = true;
|
||||
this->shutting_down_ = false;
|
||||
flushing = false;
|
||||
this->merge_mgr = new mergeManager(this);
|
||||
this->mergedata = 0;
|
||||
|
@ -87,8 +87,8 @@ void logtable<TUPLE>::init_stasis() {
|
|||
DataPage<datatuple>::register_stasis_page_impl();
|
||||
stasis_buffer_manager_size = 768 * 1024; // 4GB = 2^10 pages:
|
||||
// XXX Workaround Stasis' (still broken) default concurrent buffer manager
|
||||
stasis_buffer_manager_factory = stasis_buffer_manager_hash_factory;
|
||||
stasis_buffer_manager_hint_writes_are_sequential = 0;
|
||||
// stasis_buffer_manager_factory = stasis_buffer_manager_hash_factory;
|
||||
// stasis_buffer_manager_hint_writes_are_sequential = 0;
|
||||
Tinit();
|
||||
|
||||
}
|
||||
|
|
|
@ -131,11 +131,11 @@ public:
|
|||
mergeManager * merge_mgr;
|
||||
|
||||
bool accepting_new_requests;
|
||||
inline bool is_still_running() { return still_running_; }
|
||||
inline bool is_still_running() { return !shutting_down_; }
|
||||
inline void stop() {
|
||||
rwlc_writelock(header_mut);
|
||||
if(still_running_) {
|
||||
still_running_ = false;
|
||||
if(!shutting_down_) {
|
||||
shutting_down_ = true;
|
||||
flushTable();
|
||||
flushing = true;
|
||||
}
|
||||
|
@ -171,8 +171,9 @@ private:
|
|||
std::vector<iterator *> its;
|
||||
|
||||
mergeStats * c0_stats;
|
||||
bool still_running_;
|
||||
|
||||
public:
|
||||
bool shutting_down_;
|
||||
|
||||
template<class ITRA, class ITRN>
|
||||
class mergeManyIterator {
|
||||
|
|
|
@ -172,7 +172,8 @@ void* memMergeThread(void*arg)
|
|||
// memTreeComponent<datatuple>::batchedRevalidatingIterator *itrB =
|
||||
// new memTreeComponent<datatuple>::batchedRevalidatingIterator(ltable->get_tree_c0(), <able->tree_bytes, ltable->max_c0_size, <able->flushing, 100, <able->rb_mut);
|
||||
#endif
|
||||
const int64_t min_bloom_target = 1000000000;
|
||||
const int64_t min_bloom_target = ltable->max_c0_size;
|
||||
|
||||
//create a new tree
|
||||
diskTreeComponent * c1_prime = new diskTreeComponent(xid, ltable->internal_region_size, ltable->datapage_region_size, ltable->datapage_size, stats, (stats->target_size < min_bloom_target ? min_bloom_target : stats->target_size) / 100);
|
||||
|
||||
|
@ -343,11 +344,12 @@ void *diskMergeThread(void*arg)
|
|||
#ifdef NO_SNOWSHOVEL
|
||||
diskTreeComponent::iterator *itrB = ltable->get_tree_c1_mergeable()->open_iterator();
|
||||
#else
|
||||
diskTreeComponent::iterator *itrB = ltable->get_tree_c1_mergeable()->open_iterator(<able->merge_mgr->cur_c1_c2_progress_delta, 0.05, 0 /*XXX*/);
|
||||
diskTreeComponent::iterator *itrB = ltable->get_tree_c1_mergeable()->open_iterator(<able->merge_mgr->cur_c1_c2_progress_delta, 0.05, <able->shutting_down_);
|
||||
#endif
|
||||
|
||||
//create a new tree
|
||||
diskTreeComponent * c2_prime = new diskTreeComponent(xid, ltable->internal_region_size, ltable->datapage_region_size, ltable->datapage_size, stats);
|
||||
diskTreeComponent * c2_prime = new diskTreeComponent(xid, ltable->internal_region_size, ltable->datapage_region_size, ltable->datapage_size, stats, (ltable->max_c0_size * *ltable->R() + stats->base_size)/ 1000);
|
||||
// diskTreeComponent * c2_prime = new diskTreeComponent(xid, ltable->internal_region_size, ltable->datapage_region_size, ltable->datapage_size, stats);
|
||||
|
||||
rwlc_unlock(ltable->header_mut);
|
||||
|
||||
|
|
Loading…
Reference in a new issue