Compare commits
3 Commits
5d3aaf016b
...
f36d7eb76c
Author | SHA1 | Date |
---|---|---|
Vitaliy Filippov | f36d7eb76c | |
Vitaliy Filippov | dd7f651de1 | |
Vitaliy Filippov | a2994ecd0d |
|
@ -886,7 +886,7 @@ class Mon
|
|||
{
|
||||
// Numeric IDs are reserved for OSDs
|
||||
const osd_cfg = this.state.config.osd[osd_num];
|
||||
let reweight = osd_cfg && Number(osd_cfg.reweight);
|
||||
let reweight = osd_cfg == null ? 1 : Number(osd_cfg.reweight);
|
||||
if (reweight < 0 || isNaN(reweight))
|
||||
reweight = 1;
|
||||
if (this.state.osd.state[osd_num] && reweight > 0)
|
||||
|
|
|
@ -86,6 +86,8 @@ void journal_flusher_t::loop()
|
|||
cur_flusher_count--;
|
||||
}
|
||||
}
|
||||
if (trim_wanted)
|
||||
co[0].try_trim = true;
|
||||
for (int i = 0; (active_flushers > 0 || dequeuing || trim_wanted > 0) && i < cur_flusher_count; i++)
|
||||
co[i].loop();
|
||||
}
|
||||
|
@ -364,10 +366,10 @@ resume_0:
|
|||
!flusher->flush_queue.size() || !flusher->dequeuing)
|
||||
{
|
||||
stop_flusher:
|
||||
if (flusher->trim_wanted > 0 && cur.oid.inode != 0)
|
||||
if (flusher->trim_wanted > 0 && try_trim)
|
||||
{
|
||||
// Attempt forced trim
|
||||
cur.oid = {};
|
||||
try_trim = false;
|
||||
flusher->active_flushers++;
|
||||
goto trim_journal;
|
||||
}
|
||||
|
@ -375,6 +377,7 @@ stop_flusher:
|
|||
wait_state = 0;
|
||||
return true;
|
||||
}
|
||||
try_trim = true;
|
||||
cur.oid = flusher->flush_queue.front();
|
||||
cur.version = flusher->flush_versions[cur.oid];
|
||||
flusher->flush_queue.pop_front();
|
||||
|
|
|
@ -60,6 +60,7 @@ class journal_flusher_co
|
|||
std::map<object_id, uint64_t>::iterator repeat_it;
|
||||
std::function<void(ring_data_t*)> simple_callback_r, simple_callback_rj, simple_callback_w;
|
||||
|
||||
bool try_trim = false;
|
||||
bool skip_copy, has_delete, has_writes;
|
||||
std::vector<copy_buffer_t> v;
|
||||
std::vector<copy_buffer_t>::iterator it;
|
||||
|
|
|
@ -48,7 +48,7 @@ start_etcd()
|
|||
--advertise-client-urls http://$ETCD_IP:$((ETCD_PORT+2*i-2)) --listen-client-urls http://$ETCD_IP:$((ETCD_PORT+2*i-2)) \
|
||||
--initial-advertise-peer-urls http://$ETCD_IP:$((ETCD_PORT+2*i-1)) --listen-peer-urls http://$ETCD_IP:$((ETCD_PORT+2*i-1)) \
|
||||
--initial-cluster-token vitastor-tests-etcd --initial-cluster-state new \
|
||||
--initial-cluster "$ETCD_CLUSTER" \
|
||||
--initial-cluster "$ETCD_CLUSTER" --max-request-bytes=104857600 \
|
||||
--max-txn-ops=100000 --auto-compaction-retention=10 --auto-compaction-mode=revision &>./testdata/etcd$i.log &
|
||||
eval ETCD${i}_PID=$!
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue