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

write hardstate after persisting the entries #1365

Merged
merged 1 commit into from
Aug 28, 2017
Merged

Conversation

janardhan1993
Copy link
Contributor

@janardhan1993 janardhan1993 commented Aug 28, 2017

This change is Reviewable

@manishrjain
Copy link
Contributor

:lgtm:


Reviewed 1 of 1 files at r1.
Review status: all files reviewed at latest revision, 1 unresolved discussion.


raftwal/wal.go, line 132 at r1 (raw file):

	}

	if !raft.IsEmptyHardState(h) {

Create a PR for godoc of Raft as well, so it's clear that hard state should be written only after entries.


Comments from Reviewable

@janardhan1993
Copy link
Contributor Author

Review status: all files reviewed at latest revision, 1 unresolved discussion.


raftwal/wal.go, line 132 at r1 (raw file):

Previously, manishrjain (Manish R Jain) wrote…

Create a PR for godoc of Raft as well, so it's clear that hard state should be written only after entries.

Done.


Comments from Reviewable

@janardhan1993 janardhan1993 merged commit d14bb29 into master Aug 28, 2017
@janardhan1993 janardhan1993 deleted the fix/missing_entry branch August 28, 2017 01:50
@srh
Copy link

srh commented Aug 28, 2017

raftwal/wal.go, line 132 at r1 (raw file):

Previously, janardhan1993 (Janardhan Reddy) wrote…

Done.

Or at the same time.


Comments from Reviewable

@janardhan1993
Copy link
Contributor Author

raftwal/wal.go, line 132 at r1 (raw file):

Previously, srh (Sam Hughes) wrote…

Or at the same time.

Badger doesn't support at the same time.


Comments from Reviewable

@manishrjain
Copy link
Contributor

raftwal/wal.go, line 132 at r1 (raw file):

Previously, janardhan1993 (Janardhan Reddy) wrote…

Badger doesn't support at the same time.

Well, it does. You could do one batched write for both hard state and snapshot. Would be faster than doing one after another.


Comments from Reviewable

@srh
Copy link

srh commented Aug 30, 2017

raftwal/wal.go, line 132 at r1 (raw file):

Previously, manishrjain (Manish R Jain) wrote…

Well, it does. You could do one batched write for both hard state and snapshot. Would be faster than doing one after another.

Badger doesn't write those in one atomic write to the value log though, so the order still matters for Badger.


Comments from Reviewable

jarifibrahim pushed a commit that referenced this pull request Jun 18, 2020
This change brings following new commits from badger
```
dd332b0 Avoid panic in filltables() (#1365)
c45d966 Fix assert in background compression and encryption. (#1366)
```
jarifibrahim pushed a commit that referenced this pull request Jul 11, 2020
This commit brings following new changes from badger
This commit also disable conflict detection in badger to save memory.

```
0dfb8b4 Changelog for v20.07.0 (#1411)
03ba278 Add missing changelog for v2.0.3 (#1410)
6001230 Revert "Compress/Encrypt Blocks in the background (#1227)" (#1409)
800305e Revert "Buffer pool for decompression (#1308)" (#1408)
63d9309 Revert "fix: Fix race condition in block.incRef (#1337)" (#1407)
e0d058c Revert "add assert to check integer overflow for table size (#1402)" (#1406)
d981f47 return error if the vlog writes exceeds more that 4GB. (#1400)
7f4e4b5 add assert to check integer overflow for table size (#1402)
8e896a7 Add a contribution guide (#1379)
b79aeef Avoid panic on multiple closer.Signal calls (#1401)
717b89c Enable cross-compiled 32bit tests on TravisCI (#1392)
09dfa66 Update ristretto to commit f66de99 (#1391)
509de73 Update head while replaying value log (#1372)
e013bfd Rework DB.DropPrefix (#1381)
3042e37 pre allocate cache key for the block cache and the bloom filter cache (#1371)
675efcd Increase default valueThreshold from 32B to 1KB (#1346)
158d927 Remove second initialization of writech in Open (#1382)
d37ce36 Tests: Use t.Parallel in TestIteratePrefix tests  (#1377)
3f4761d Force KeepL0InMemory to be true when InMemory is true (#1375)
dd332b0 Avoid panic in filltables() (#1365)
c45d966 Fix assert in background compression and encryption. (#1366)
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants