Compare commits
7 Commits
49e9fdbfa3
...
3128da6adc
Author | SHA1 | Date |
---|---|---|
Vitaliy Filippov | 3128da6adc | |
Vitaliy Filippov | 7403273c49 | |
Vitaliy Filippov | 60de950d70 | |
Vitaliy Filippov | 2b404aea96 | |
Vitaliy Filippov | 35f586f0b8 | |
Vitaliy Filippov | e8b600f536 | |
Vitaliy Filippov | 2692f4abc9 |
|
@ -228,6 +228,7 @@ class AntiCluster
|
|||
throw new Error('BUG: no max term during resync');
|
||||
}
|
||||
with_max = with_max.filter(w => w != this.cfg.node_id);
|
||||
console.log('Local term '+this.antietcd.stored_term+', max follower term '+max_term+' at nodes '+with_max.join(', '));
|
||||
// Merge databases of all nodes with maximum term
|
||||
// Force other nodes to replicate the merged DB, throwing away their own states
|
||||
for (let i = 0; i < with_max.length; i++)
|
||||
|
|
|
@ -28,7 +28,7 @@ class AntiPersistence
|
|||
this.loading = true;
|
||||
this.antietcd.etctree.load(data);
|
||||
this.loading = false;
|
||||
this.antietcd.stored_term = data['term'];
|
||||
this.antietcd.stored_term = data['term'] || 0;
|
||||
}
|
||||
else if (err.code != 'ENOENT')
|
||||
{
|
||||
|
|
|
@ -292,7 +292,7 @@ class EtcTree
|
|||
{
|
||||
for (const k in cur_old.children)
|
||||
{
|
||||
if (!cur_new.children[k])
|
||||
if (!cur_new.children || !cur_new.children[k])
|
||||
{
|
||||
// Delete subtree
|
||||
this._delete_all(
|
||||
|
|
Loading…
Reference in New Issue