-
Notifications
You must be signed in to change notification settings - Fork 0
/
example.out
842 lines (732 loc) · 20.5 KB
/
example.out
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
RANGE DESCRIPTOR
id: 0
start: 0
end: 9
leaseholder_id: 3
leader_id: 2
replicas_id: { 2 3 4 }
RANGE DESCRIPTOR
id: 1
start: 10
end: 19
leaseholder_id: 4
leader_id: 3
replicas_id: { 0 3 4 }
RANGE DESCRIPTOR
id: 2
start: 20
end: 29
leaseholder_id: 4
leader_id: 3
replicas_id: { 0 3 4 }
RANGE DESCRIPTOR
id: 3
start: 30
end: 39
leaseholder_id: 1
leader_id: 0
replicas_id: { 0 1 2 }
RANGE DESCRIPTOR
id: 4
start: 40
end: 49
leaseholder_id: 4
leader_id: 3
replicas_id: { 0 3 4 }
RANGE DESCRIPTOR
id: 5
start: 50
end: 59
leaseholder_id: 1
leader_id: 0
replicas_id: { 0 1 2 }
RANGE DESCRIPTOR
id: 6
start: 60
end: 69
leaseholder_id: 2
leader_id: 1
replicas_id: { 1 2 3 }
RANGE DESCRIPTOR
id: 7
start: 70
end: 79
leaseholder_id: 1
leader_id: 0
replicas_id: { 0 1 2 }
RANGE DESCRIPTOR
id: 8
start: 80
end: 89
leaseholder_id: 3
leader_id: 2
replicas_id: { 2 3 4 }
RANGE DESCRIPTOR
id: 9
start: 90
end: 100
leaseholder_id: 3
leader_id: 2
replicas_id: { 2 3 4 }
STARTING INSERTION OF PAIR (1, 223)
Node 4 just received a command using key 1
Node 4 forwarded command to leaseholder with id = 3
Node 3 just received a command using key 1
Node 3 is the appropriate leaseholder for range:
RANGE DESCRIPTOR
id: 0
start: 0
end: 9
leaseholder_id: 3
leader_id: 2
replicas_id: { 2 3 4 }
Leaseholder 3 proposed command to leader with id = 2
Starting pushing command to logs...
Leader 2 goes first
Command just pushed to Log of Node 2
Command just pushed to Log of Node 3
Command just pushed to Log of Node 4
Starting applying command in replicas...
Leader 2 goes first
Applying command CREATE in node 2
Applying command CREATE in node 3
Applying command CREATE in node 4
INSERTION SUCCESSFUL
STARTING INSERTION OF PAIR (10, 65422)
Node 1 just received a command using key 10
Node 1 forwarded command to leaseholder with id = 4
Node 4 just received a command using key 10
Node 4 is the appropriate leaseholder for range:
RANGE DESCRIPTOR
id: 1
start: 10
end: 19
leaseholder_id: 4
leader_id: 3
replicas_id: { 0 3 4 }
Leaseholder 4 proposed command to leader with id = 3
Starting pushing command to logs...
Leader 3 goes first
Command just pushed to Log of Node 3
Command just pushed to Log of Node 0
Command just pushed to Log of Node 4
Starting applying command in replicas...
Leader 3 goes first
Applying command CREATE in node 3
Applying command CREATE in node 0
Applying command CREATE in node 4
INSERTION SUCCESSFUL
STARTING INSERTION OF PAIR (20, 2652)
Node 1 just received a command using key 20
Node 1 forwarded command to leaseholder with id = 4
Node 4 just received a command using key 20
Node 4 is the appropriate leaseholder for range:
RANGE DESCRIPTOR
id: 2
start: 20
end: 29
leaseholder_id: 4
leader_id: 3
replicas_id: { 0 3 4 }
Leaseholder 4 proposed command to leader with id = 3
Starting pushing command to logs...
Leader 3 goes first
Command just pushed to Log of Node 3
Command just pushed to Log of Node 0
Command just pushed to Log of Node 4
Starting applying command in replicas...
Leader 3 goes first
Applying command CREATE in node 3
Applying command CREATE in node 0
Applying command CREATE in node 4
INSERTION SUCCESSFUL
STARTING INSERTION OF PAIR (30, 2542)
Node 2 just received a command using key 30
Node 2 forwarded command to leaseholder with id = 1
Node 1 just received a command using key 30
Node 1 is the appropriate leaseholder for range:
RANGE DESCRIPTOR
id: 3
start: 30
end: 39
leaseholder_id: 1
leader_id: 0
replicas_id: { 0 1 2 }
Leaseholder 1 proposed command to leader with id = 0
Starting pushing command to logs...
Leader 0 goes first
Command just pushed to Log of Node 0
Command just pushed to Log of Node 1
Command just pushed to Log of Node 2
Starting applying command in replicas...
Leader 0 goes first
Applying command CREATE in node 0
Applying command CREATE in node 1
Applying command CREATE in node 2
INSERTION SUCCESSFUL
STARTING INSERTION OF PAIR (40, 652)
Node 4 just received a command using key 40
Node 4 is the appropriate leaseholder for range:
RANGE DESCRIPTOR
id: 4
start: 40
end: 49
leaseholder_id: 4
leader_id: 3
replicas_id: { 0 3 4 }
Leaseholder 4 proposed command to leader with id = 3
Starting pushing command to logs...
Leader 3 goes first
Command just pushed to Log of Node 3
Command just pushed to Log of Node 0
Command just pushed to Log of Node 4
Starting applying command in replicas...
Leader 3 goes first
Applying command CREATE in node 3
Applying command CREATE in node 0
Applying command CREATE in node 4
INSERTION SUCCESSFUL
STARTING INSERTION OF PAIR (70, 265)
Node 2 just received a command using key 70
Node 2 forwarded command to leaseholder with id = 1
Node 1 just received a command using key 70
Node 1 is the appropriate leaseholder for range:
RANGE DESCRIPTOR
id: 7
start: 70
end: 79
leaseholder_id: 1
leader_id: 0
replicas_id: { 0 1 2 }
Leaseholder 1 proposed command to leader with id = 0
Starting pushing command to logs...
Leader 0 goes first
Command just pushed to Log of Node 0
Command just pushed to Log of Node 1
Command just pushed to Log of Node 2
Starting applying command in replicas...
Leader 0 goes first
Applying command CREATE in node 0
Applying command CREATE in node 1
Applying command CREATE in node 2
INSERTION SUCCESSFUL
STARTING INSERTION OF PAIR (50, 298)
Node 3 just received a command using key 50
Node 3 forwarded command to leaseholder with id = 1
Node 1 just received a command using key 50
Node 1 is the appropriate leaseholder for range:
RANGE DESCRIPTOR
id: 5
start: 50
end: 59
leaseholder_id: 1
leader_id: 0
replicas_id: { 0 1 2 }
Leaseholder 1 proposed command to leader with id = 0
Starting pushing command to logs...
Leader 0 goes first
Command just pushed to Log of Node 0
Command just pushed to Log of Node 1
Command just pushed to Log of Node 2
Starting applying command in replicas...
Leader 0 goes first
Applying command CREATE in node 0
Applying command CREATE in node 1
Applying command CREATE in node 2
INSERTION SUCCESSFUL
STARTING INSERTION OF PAIR (1000, 265)
Key must be between 0 and MAX_KEY
INSERTION FAILED
STARTING INSERTION OF PAIR (-1, 298)
Key and value must be both nonnegative
INSERTION FAILED
Node with ID = 0
Log: [ ]
Key-Value store: [ { 10, 65422 }, { 20, 2652 }, { 30, 2542 }, { 40, 652 }, { 50, 298 }, { 70, 265 }, ]
Node with ID = 1
Log: [ ]
Key-Value store: [ { 30, 2542 }, { 50, 298 }, { 70, 265 }, ]
Node with ID = 2
Log: [ ]
Key-Value store: [ { 1, 223 }, { 30, 2542 }, { 50, 298 }, { 70, 265 }, ]
Node with ID = 3
Log: [ ]
Key-Value store: [ { 1, 223 }, { 10, 65422 }, { 20, 2652 }, { 40, 652 }, ]
Node with ID = 4
Log: [ ]
Key-Value store: [ { 1, 223 }, { 10, 65422 }, { 20, 2652 }, { 40, 652 }, ]
STARTING GET OF KEY 1
Node 4 just received a command using key 1
Node 4 forwarded command to leaseholder with id = 3
Node 3 just received a command using key 1
Node 3 is the appropriate leaseholder for range:
RANGE DESCRIPTOR
id: 0
start: 0
end: 9
leaseholder_id: 3
leader_id: 2
replicas_id: { 2 3 4 }
Leaseholder 3 proposed command to leader with id = 2
Leader 2 will apply READ without replication
Applying command READ in node 2
GET SUCCESSFUL (VALUE = 223)
STARTING GET OF KEY 10
Node 0 just received a command using key 10
Node 0 forwarded command to leaseholder with id = 4
Node 4 just received a command using key 10
Node 4 is the appropriate leaseholder for range:
RANGE DESCRIPTOR
id: 1
start: 10
end: 19
leaseholder_id: 4
leader_id: 3
replicas_id: { 0 3 4 }
Leaseholder 4 proposed command to leader with id = 3
Leader 3 will apply READ without replication
Applying command READ in node 3
GET SUCCESSFUL (VALUE = 65422)
STARTING GET OF KEY 20
Node 3 just received a command using key 20
Node 3 forwarded command to leaseholder with id = 4
Node 4 just received a command using key 20
Node 4 is the appropriate leaseholder for range:
RANGE DESCRIPTOR
id: 2
start: 20
end: 29
leaseholder_id: 4
leader_id: 3
replicas_id: { 0 3 4 }
Leaseholder 4 proposed command to leader with id = 3
Leader 3 will apply READ without replication
Applying command READ in node 3
GET SUCCESSFUL (VALUE = 2652)
STARTING GET OF KEY 30
Node 3 just received a command using key 30
Node 3 forwarded command to leaseholder with id = 1
Node 1 just received a command using key 30
Node 1 is the appropriate leaseholder for range:
RANGE DESCRIPTOR
id: 3
start: 30
end: 39
leaseholder_id: 1
leader_id: 0
replicas_id: { 0 1 2 }
Leaseholder 1 proposed command to leader with id = 0
Leader 0 will apply READ without replication
Applying command READ in node 0
GET SUCCESSFUL (VALUE = 2542)
STARTING GET OF KEY 40
Node 1 just received a command using key 40
Node 1 forwarded command to leaseholder with id = 4
Node 4 just received a command using key 40
Node 4 is the appropriate leaseholder for range:
RANGE DESCRIPTOR
id: 4
start: 40
end: 49
leaseholder_id: 4
leader_id: 3
replicas_id: { 0 3 4 }
Leaseholder 4 proposed command to leader with id = 3
Leader 3 will apply READ without replication
Applying command READ in node 3
GET SUCCESSFUL (VALUE = 652)
STARTING GET OF KEY 31
Node 1 just received a command using key 31
Node 1 is the appropriate leaseholder for range:
RANGE DESCRIPTOR
id: 3
start: 30
end: 39
leaseholder_id: 1
leader_id: 0
replicas_id: { 0 1 2 }
Leaseholder 1 proposed command to leader with id = 0
Leader 0 will apply READ without replication
Applying command READ in node 0
Key 31 does not exist in this node
GET FAILED
STARTING GET OF KEY 41
Node 0 just received a command using key 41
Node 0 forwarded command to leaseholder with id = 4
Node 4 just received a command using key 41
Node 4 is the appropriate leaseholder for range:
RANGE DESCRIPTOR
id: 4
start: 40
end: 49
leaseholder_id: 4
leader_id: 3
replicas_id: { 0 3 4 }
Leaseholder 4 proposed command to leader with id = 3
Leader 3 will apply READ without replication
Applying command READ in node 3
Key 41 does not exist in this node
GET FAILED
Node with ID = 0
Log: [ ]
Key-Value store: [ { 10, 65422 }, { 20, 2652 }, { 30, 2542 }, { 40, 652 }, { 50, 298 }, { 70, 265 }, ]
Node with ID = 1
Log: [ ]
Key-Value store: [ { 30, 2542 }, { 50, 298 }, { 70, 265 }, ]
Node with ID = 2
Log: [ ]
Key-Value store: [ { 1, 223 }, { 30, 2542 }, { 50, 298 }, { 70, 265 }, ]
Node with ID = 3
Log: [ ]
Key-Value store: [ { 1, 223 }, { 10, 65422 }, { 20, 2652 }, { 40, 652 }, ]
Node with ID = 4
Log: [ ]
Key-Value store: [ { 1, 223 }, { 10, 65422 }, { 20, 2652 }, { 40, 652 }, ]
STARTING UPDATE USING PAIR (1, 2223)
Node 0 just received a command using key 1
Node 0 forwarded command to leaseholder with id = 3
Node 3 just received a command using key 1
Node 3 is the appropriate leaseholder for range:
RANGE DESCRIPTOR
id: 0
start: 0
end: 9
leaseholder_id: 3
leader_id: 2
replicas_id: { 2 3 4 }
Leaseholder 3 proposed command to leader with id = 2
Starting pushing command to logs...
Leader 2 goes first
Command just pushed to Log of Node 2
Command just pushed to Log of Node 3
Command just pushed to Log of Node 4
Starting applying command in replicas...
Leader 2 goes first
Applying command UPDATE in node 2
Applying command UPDATE in node 3
Applying command UPDATE in node 4
UPDATE SUCCESSFUL
STARTING UPDATE USING PAIR (10, 654224)
Node 0 just received a command using key 10
Node 0 forwarded command to leaseholder with id = 4
Node 4 just received a command using key 10
Node 4 is the appropriate leaseholder for range:
RANGE DESCRIPTOR
id: 1
start: 10
end: 19
leaseholder_id: 4
leader_id: 3
replicas_id: { 0 3 4 }
Leaseholder 4 proposed command to leader with id = 3
Starting pushing command to logs...
Leader 3 goes first
Command just pushed to Log of Node 3
Command just pushed to Log of Node 0
Command just pushed to Log of Node 4
Starting applying command in replicas...
Leader 3 goes first
Applying command UPDATE in node 3
Applying command UPDATE in node 0
Applying command UPDATE in node 4
UPDATE SUCCESSFUL
STARTING UPDATE USING PAIR (20, 26352)
Node 4 just received a command using key 20
Node 4 is the appropriate leaseholder for range:
RANGE DESCRIPTOR
id: 2
start: 20
end: 29
leaseholder_id: 4
leader_id: 3
replicas_id: { 0 3 4 }
Leaseholder 4 proposed command to leader with id = 3
Starting pushing command to logs...
Leader 3 goes first
Command just pushed to Log of Node 3
Command just pushed to Log of Node 0
Command just pushed to Log of Node 4
Starting applying command in replicas...
Leader 3 goes first
Applying command UPDATE in node 3
Applying command UPDATE in node 0
Applying command UPDATE in node 4
UPDATE SUCCESSFUL
STARTING UPDATE USING PAIR (30, 25842)
Node 3 just received a command using key 30
Node 3 forwarded command to leaseholder with id = 1
Node 1 just received a command using key 30
Node 1 is the appropriate leaseholder for range:
RANGE DESCRIPTOR
id: 3
start: 30
end: 39
leaseholder_id: 1
leader_id: 0
replicas_id: { 0 1 2 }
Leaseholder 1 proposed command to leader with id = 0
Starting pushing command to logs...
Leader 0 goes first
Command just pushed to Log of Node 0
Command just pushed to Log of Node 1
Command just pushed to Log of Node 2
Starting applying command in replicas...
Leader 0 goes first
Applying command UPDATE in node 0
Applying command UPDATE in node 1
Applying command UPDATE in node 2
UPDATE SUCCESSFUL
STARTING UPDATE USING PAIR (40, 8652)
Node 4 just received a command using key 40
Node 4 is the appropriate leaseholder for range:
RANGE DESCRIPTOR
id: 4
start: 40
end: 49
leaseholder_id: 4
leader_id: 3
replicas_id: { 0 3 4 }
Leaseholder 4 proposed command to leader with id = 3
Starting pushing command to logs...
Leader 3 goes first
Command just pushed to Log of Node 3
Command just pushed to Log of Node 0
Command just pushed to Log of Node 4
Starting applying command in replicas...
Leader 3 goes first
Applying command UPDATE in node 3
Applying command UPDATE in node 0
Applying command UPDATE in node 4
UPDATE SUCCESSFUL
STARTING UPDATE USING PAIR (32, 25842)
Node 1 just received a command using key 32
Node 1 is the appropriate leaseholder for range:
RANGE DESCRIPTOR
id: 3
start: 30
end: 39
leaseholder_id: 1
leader_id: 0
replicas_id: { 0 1 2 }
Leaseholder 1 proposed command to leader with id = 0
Starting pushing command to logs...
Leader 0 goes first
Command just pushed to Log of Node 0
Command just pushed to Log of Node 1
Command just pushed to Log of Node 2
Starting applying command in replicas...
Leader 0 goes first
Applying command UPDATE in node 0
Key 32 does not exist in this node
UPDATE FAILED
STARTING UPDATE USING PAIR (49, 8652)
Node 1 just received a command using key 49
Node 1 forwarded command to leaseholder with id = 4
Node 4 just received a command using key 49
Node 4 is the appropriate leaseholder for range:
RANGE DESCRIPTOR
id: 4
start: 40
end: 49
leaseholder_id: 4
leader_id: 3
replicas_id: { 0 3 4 }
Leaseholder 4 proposed command to leader with id = 3
Starting pushing command to logs...
Leader 3 goes first
Command just pushed to Log of Node 3
Command just pushed to Log of Node 0
Command just pushed to Log of Node 4
Starting applying command in replicas...
Leader 3 goes first
Applying command UPDATE in node 3
Key 49 does not exist in this node
UPDATE FAILED
Node with ID = 0
Log: [ { type: 2, key: 49, value: 8652 }, ]
Key-Value store: [ { 10, 654224 }, { 20, 26352 }, { 30, 25842 }, { 40, 8652 }, { 50, 298 }, { 70, 265 }, ]
Node with ID = 1
Log: [ { type: 2, key: 32, value: 25842 }, ]
Key-Value store: [ { 30, 25842 }, { 50, 298 }, { 70, 265 }, ]
Node with ID = 2
Log: [ { type: 2, key: 32, value: 25842 }, ]
Key-Value store: [ { 1, 2223 }, { 30, 25842 }, { 50, 298 }, { 70, 265 }, ]
Node with ID = 3
Log: [ ]
Key-Value store: [ { 1, 2223 }, { 10, 654224 }, { 20, 26352 }, { 40, 8652 }, ]
Node with ID = 4
Log: [ { type: 2, key: 49, value: 8652 }, ]
Key-Value store: [ { 1, 2223 }, { 10, 654224 }, { 20, 26352 }, { 40, 8652 }, ]
STARTING DELETION OF KEY 1
Node 3 just received a command using key 1
Node 3 is the appropriate leaseholder for range:
RANGE DESCRIPTOR
id: 0
start: 0
end: 9
leaseholder_id: 3
leader_id: 2
replicas_id: { 2 3 4 }
Leaseholder 3 proposed command to leader with id = 2
Starting pushing command to logs...
Leader 2 goes first
Command just pushed to Log of Node 2
Command just pushed to Log of Node 3
Command just pushed to Log of Node 4
Starting applying command in replicas...
Leader 2 goes first
Applying command DELETE in node 2
Applying command DELETE in node 3
Applying command DELETE in node 4
DELETION SUCCESSFUL
STARTING DELETION OF KEY 10
Node 2 just received a command using key 10
Node 2 forwarded command to leaseholder with id = 4
Node 4 just received a command using key 10
Node 4 is the appropriate leaseholder for range:
RANGE DESCRIPTOR
id: 1
start: 10
end: 19
leaseholder_id: 4
leader_id: 3
replicas_id: { 0 3 4 }
Leaseholder 4 proposed command to leader with id = 3
Starting pushing command to logs...
Leader 3 goes first
Command just pushed to Log of Node 3
Command just pushed to Log of Node 0
Command just pushed to Log of Node 4
Starting applying command in replicas...
Leader 3 goes first
Applying command DELETE in node 3
Applying command DELETE in node 0
Applying command DELETE in node 4
DELETION SUCCESSFUL
STARTING DELETION OF KEY 20
Node 4 just received a command using key 20
Node 4 is the appropriate leaseholder for range:
RANGE DESCRIPTOR
id: 2
start: 20
end: 29
leaseholder_id: 4
leader_id: 3
replicas_id: { 0 3 4 }
Leaseholder 4 proposed command to leader with id = 3
Starting pushing command to logs...
Leader 3 goes first
Command just pushed to Log of Node 3
Command just pushed to Log of Node 0
Command just pushed to Log of Node 4
Starting applying command in replicas...
Leader 3 goes first
Applying command DELETE in node 3
Applying command DELETE in node 0
Applying command DELETE in node 4
DELETION SUCCESSFUL
STARTING DELETION OF KEY 30
Node 0 just received a command using key 30
Node 0 forwarded command to leaseholder with id = 1
Node 1 just received a command using key 30
Node 1 is the appropriate leaseholder for range:
RANGE DESCRIPTOR
id: 3
start: 30
end: 39
leaseholder_id: 1
leader_id: 0
replicas_id: { 0 1 2 }
Leaseholder 1 proposed command to leader with id = 0
Starting pushing command to logs...
Leader 0 goes first
Command just pushed to Log of Node 0
Command just pushed to Log of Node 1
Command just pushed to Log of Node 2
Starting applying command in replicas...
Leader 0 goes first
Applying command DELETE in node 0
Applying command DELETE in node 1
Applying command DELETE in node 2
DELETION SUCCESSFUL
STARTING DELETION OF KEY 40
Node 0 just received a command using key 40
Node 0 forwarded command to leaseholder with id = 4
Node 4 just received a command using key 40
Node 4 is the appropriate leaseholder for range:
RANGE DESCRIPTOR
id: 4
start: 40
end: 49
leaseholder_id: 4
leader_id: 3
replicas_id: { 0 3 4 }
Leaseholder 4 proposed command to leader with id = 3
Starting pushing command to logs...
Leader 3 goes first
Command just pushed to Log of Node 3
Command just pushed to Log of Node 0
Command just pushed to Log of Node 4
Starting applying command in replicas...
Leader 3 goes first
Applying command DELETE in node 3
Applying command DELETE in node 0
Applying command DELETE in node 4
DELETION SUCCESSFUL
STARTING DELETION OF KEY 31
Node 1 just received a command using key 31
Node 1 is the appropriate leaseholder for range:
RANGE DESCRIPTOR
id: 3
start: 30
end: 39
leaseholder_id: 1
leader_id: 0
replicas_id: { 0 1 2 }
Leaseholder 1 proposed command to leader with id = 0
Starting pushing command to logs...
Leader 0 goes first
Command just pushed to Log of Node 0
Command just pushed to Log of Node 1
Command just pushed to Log of Node 2
Starting applying command in replicas...
Leader 0 goes first
Applying command DELETE in node 0
Key 31 does not exist in this node
DELETION FAILED
STARTING DELETION OF KEY 49
Node 4 just received a command using key 49
Node 4 is the appropriate leaseholder for range:
RANGE DESCRIPTOR
id: 4
start: 40
end: 49
leaseholder_id: 4
leader_id: 3
replicas_id: { 0 3 4 }
Leaseholder 4 proposed command to leader with id = 3
Starting pushing command to logs...
Leader 3 goes first
Command just pushed to Log of Node 3
Command just pushed to Log of Node 0
Command just pushed to Log of Node 4
Starting applying command in replicas...
Leader 3 goes first
Applying command DELETE in node 3
Key 49 does not exist in this node
DELETION FAILED
Node with ID = 0
Log: [ { type: 2, key: 49, value: 8652 }, { type: 3, key: 49, value: 0 }, ]
Key-Value store: [ { 50, 298 }, { 70, 265 }, ]
Node with ID = 1
Log: [ { type: 2, key: 32, value: 25842 }, { type: 3, key: 31, value: 0 }, ]
Key-Value store: [ { 50, 298 }, { 70, 265 }, ]
Node with ID = 2
Log: [ { type: 2, key: 32, value: 25842 }, { type: 3, key: 31, value: 0 }, ]
Key-Value store: [ { 50, 298 }, { 70, 265 }, ]
Node with ID = 3
Log: [ ]
Key-Value store: [ ]
Node with ID = 4
Log: [ { type: 2, key: 49, value: 8652 }, { type: 3, key: 49, value: 0 }, ]
Key-Value store: [ ]