Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move event hashing out of balloon internals #136

Merged
merged 6 commits into from
Jun 11, 2019
Merged

Conversation

jllucas
Copy link

@jllucas jllucas commented Jun 10, 2019

Move hashing from balloon internals (balloon.go) to Raft (raft.go), just before inserting the command to the WriteAheadLog.

Others:

  • AddEventCommand and AddEventBulkCommand modified.

@jllucas
Copy link
Author

jllucas commented Jun 10, 2019

BenchmarkRaftAdd with b.N = 2000000

HASHING OUTSIDE BALLOON

event := utilrand.Bytes(128)

| => du -sh /var/tmp/raft-test/node1/raft/wal/*

176M /var/tmp/raft-test/node1/raft/wal/000003.log
52K /var/tmp/raft-test/node1/raft/wal/LOG

event := utilrand.Bytes(2048)

| => du -sh /var/tmp/raft-test/node1/raft/wal/*

176M /var/tmp/raft-test/node1/raft/wal/000003.log
52K /var/tmp/raft-test/node1/raft/wal/LOG

HASHING INSIDE BALLOON (MASTER BRANCH)

event := utilrand.Bytes(128)

| => du -sh /var/tmp/raft-test/node1/raft/wal/*

224M /var/tmp/raft-test/node1/raft/wal/000003.log
145M /var/tmp/raft-test/node1/raft/wal/000011.log
52K /var/tmp/raft-test/node1/raft/wal/LOG

event := utilrand.Bytes(2048)

| => du -sh /var/tmp/raft-test/node1/raft/wal/*

256M /var/tmp/raft-test/node1/raft/wal/000003.log
257M /var/tmp/raft-test/node1/raft/wal/000011.log
257M /var/tmp/raft-test/node1/raft/wal/000012.log
257M /var/tmp/raft-test/node1/raft/wal/000014.log
257M /var/tmp/raft-test/node1/raft/wal/000015.log
257M /var/tmp/raft-test/node1/raft/wal/000017.log
257M /var/tmp/raft-test/node1/raft/wal/000018.log
256M /var/tmp/raft-test/node1/raft/wal/000020.log
256M /var/tmp/raft-test/node1/raft/wal/000021.log
256M /var/tmp/raft-test/node1/raft/wal/000023.log
257M /var/tmp/raft-test/node1/raft/wal/000024.log
257M /var/tmp/raft-test/node1/raft/wal/000026.log
256M /var/tmp/raft-test/node1/raft/wal/000027.log
257M /var/tmp/raft-test/node1/raft/wal/000029.log
257M /var/tmp/raft-test/node1/raft/wal/000030.log
256M /var/tmp/raft-test/node1/raft/wal/000032.log
97M /var/tmp/raft-test/node1/raft/wal/000033.log
496M /var/tmp/raft-test/node1/raft/wal/000034.sst
113M /var/tmp/raft-test/node1/raft/wal/000035.sst
132K /var/tmp/raft-test/node1/raft/wal/LOG

@jllucas jllucas merged commit 6340937 into BBVA:master Jun 11, 2019
@jllucas jllucas deleted the hashing branch June 11, 2019 13:12
suizman pushed a commit that referenced this pull request Sep 30, 2019
Move event hashing out of balloon internals

Former-commit-id: 6340937
suizman pushed a commit that referenced this pull request Sep 30, 2019
Move event hashing out of balloon internals

Former-commit-id: 47067c1 [formerly 6340937]
Former-commit-id: 74f149d
suizman pushed a commit that referenced this pull request Sep 30, 2019
Move event hashing out of balloon internals

Former-commit-id: 6340937
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant