small medium large xlarge

The latest version of the book is B1.0, released 2 months ago. If you've bought a PDF of the book and would like to update it to this version (for free), visit your home page.

By default this page displays the errata for the latest version of the book. If you have a previous version, select it here:

If you've found a new error, please submit it.

  • Typo
  • Tech. error
  • Suggestion
  • Maybe next edition
  • Not a problem
  • Reported in: B1.0 (10-Apr-20)
  • Fixed: 15-Apr-20, awaiting book release
#86554
PDF page: 3
Last paragraph, second line contains "... as if the designers had Go had taken ..." probably should read "... as if the designers of Go had taken ..."...more...
Travis Jeffery says: Good catch! Thanks.
  • Reported in: B1.0 (27-Mar-20)
  • Fixed: 27-Mar-20, awaiting book release
#86476
PDF page: 5
Looks like there's a missing word here: "and I’ve found Go to the most pleasant by far." I'm guessing it was meant to be: "I've found Go to <be>...more...
  • Reported in: B1.0 (30-Apr-20)
#86685
PDF page: 6
Paper page: 11
The problem is in using []byte instead of string for Value in the Record struct. The encoding/json package will expect a base64 encoded string when ...more...
  • Reported in: B1.0 (28-Mar-20)
  • Fixed: 10-Apr-20, awaiting book release
#86490
PDF page: 6
The first code example, for log.go, has an improper path name if compared to the path of the project created in the previous page. Title of the cod...more...
Travis Jeffery says: Ah yeah I have to put split out each chapter's code. I might just have to write something in the book that says that's the way the filenames are set up and to ignore the first part of the path. Before each code snippet I say the code path too.
  • Reported in: B1.0 (28-Mar-20)
  • Fixed: 03-Apr-20, awaiting book release
#86491
PDF page: 7

Code example file name is LetsGo/internal/server/http.go. The instructions right above say to create a file called server.go.--Jeramy Singleton

  • Reported in: B1.0 (27-Mar-20)
  • Fixed: 27-Mar-20, awaiting book release
#86475
PDF page: 11
The 3rd curl command is missing a quotation mark in the data being POSTed. $ curl -X POST localhost:8080 -d \ '{record": {"value": "TGV0J3MgR28gIz...more...
  • Reported in: B1.0 (28-Mar-20)
  • Fixed: 03-Apr-20, awaiting book release
#86492
PDF page: 17
$ echo 'export PATH="$PATH:/usr/local/protobuf/bin"'" >> ~/.zshenv It should be $ echo 'export PATH="$PATH:/usr/local/protobuf/bin/protoc"'" >> ...more...
Travis Jeffery says: Yep, thanks! Fixed: echo 'export PATH="$PATH:/usr/local/protobuf/bin"' >> ~/.zshenv
  • Reported in: B1.0 (27-Mar-20)
  • Fixed: 03-Apr-20, awaiting book release
#86479
PDF page: 19
This is likely an issue with my own setup, but in case it's not, on page 19 the reader is asked to run a 'go get' command before compiling the log.pro...more...
Travis Jeffery says: Not your setup, the command was wrong. Should have been go get github.com/gogo/protobuf/...@v1.3.1. I've fixed it, will be in the next beta. Thanks.
  • Reported in: B1.0 (05-Apr-20)
  • Fixed: 07-Apr-20, awaiting book release
#86529
PDF page: 20

Following up on #86500. It was because $GOPATH/bin was not on my load path.

Travis Jeffery says: Thanks!
  • Reported in: B1.0 (31-Mar-20)
  • Fixed: 07-Apr-20, awaiting book release
#86500
PDF page: 20
I followed the setup in the book, but cannot generate the proto. When running the proto generation code I get the message: Missing output directives. ...more...
Travis Jeffery says: If you run this does that fix it? I know that's a problem:` go get github.com/gogo/protobuf/...@v1.3.1` But this problem you're having might be from not having the right indentation or something in the Makefile.
  • Reported in: B1.0 (29-Apr-20)
#86671
PDF page: 29
I've tried to follow your suggestions on how to install protobuf and plugins, but I get this error when I run `make`. Instead of catering for all sor...more...
  • Reported in: B1.0 (06-Apr-20)
  • Fixed: 16-Apr-20, awaiting book release
#86534
PDF page: 30
In the code example for /log/index.go, you've declared offWidth as a uint64 but later on mention that it's defined as a uint32 so that it takes up 4 b...more...
Travis Jeffery says: offWidth is just defining the width. width of four 4 matches 32/8. I can see how that might be a bit confusing.
  • Reported in: B1.0 (06-Apr-20)
  • Fixed: 10-Apr-20, awaiting book release
#86531
PDF page: 37
Paper page: 29

in this line (helper testAppend function)
n, pos, err := s.Append(write)
write - is undefined--Nikolai

Travis Jeffery says: write is defined on page 28 at the very bottom. I think you may have just missed that in the snippet.
  • Reported in: B1.0 (17-Apr-20)
  • Fixed: 18-Apr-20, awaiting book release
#86613
PDF page: 37
In the paragraph at the top of page 37, describing the newSegment function, it says "Next, we call Truncate() on the index file to ensure it’s the pro...more...
Travis Jeffery says: Yep, thanks!
  • Reported in: B1.0 (18-Apr-20)
#86616
PDF page: 37
After finishing up the consensus section, I ended up getting test failures in the agent and distributed log tests due to the initial leader election n...more...
  • Reported in: B1.0 (27-Mar-20)
  • Fixed: 03-Apr-20, awaiting book release
#86477
PDF page: 38
In the listing for the segment.Remove() method, a "s.Close()" method is being called, but I'm not finding its definition in the text, and you might wa...more...
Travis Jeffery says: Whoops, forgot to include the snippet. Thanks!
  • Reported in: B1.0 (31-May-20)
#86774
PDF page: 39
maybe i'm missing something but func nearestMultiple(j, k uint64) uint64{ if j>= 0{ return (j/k) * k } return ((j-k+1) / k) * k } j is ...more...
  • Reported in: B1.0 (27-Mar-20)
  • Fixed: 03-Apr-20, awaiting book release
#86478
PDF page: 43
In the listing for the log.Read method, it has a test in the "for" loop that looks like this: if segment.baseOffset <= off { ... break } Let's say...more...
Travis Jeffery says: You're right, I forgot to add the second part of the condition: segment.baseOffset <= off && off < segment.nextOffset. Will update, thanks!
  • Reported in: B1.0 (09-Apr-20)
  • Fixed: 10-Apr-20, awaiting book release
#86543
PDF page: 45
In the description paragraph for Log's Truncate method contains this sentence, "Because we don’t have disks with infinite space, we’ll periodically ca...more...
Travis Jeffery says: Yeah needed "processed" in there thanks!
  • Reported in: B1.0 (09-Apr-20)
  • Fixed: 10-Apr-20, awaiting book release
#86544
PDF page: 45
"newSegment(off int64) creates a new segment, appends that segment to the log’s slice of segments, and makes the new segment the active segment so tha...more...
  • Reported in: B1.0 (09-Apr-20)
  • Fixed: 10-Apr-20, awaiting book release
#86545
PDF page: 47
In the code snippet for testInitExisting, you changed the variable name of log *log.Log to o *log.Log. While the code is still correct, it's an notice...more...
  • Reported in: B1.0 (09-Apr-20)
  • Fixed: 10-Apr-20, awaiting book release
#86546
PDF page: 47

Correction to #86545, I see why the difference was made! Sorry!--Jayson Smith

Travis Jeffery says: No problem, thanks!
  • Reported in: B1.0 (27-Mar-20)
  • Fixed: 12-Apr-20, awaiting book release
#86480
PDF page: 66
I think it would be nice if the tearDown function returned by testSetup would also delete the temporary directory and its contents. Additionally, a...more...
Travis Jeffery says: Fixed the tear down. Not sure about removing the main.go yet.
  • Reported in: B1.0 (15-Apr-20)
  • Fixed: 16-Apr-20, awaiting book release
#86596
PDF page: 68
In the chapter "Test a gRPC Server and Client" there are 3 unit tests. I can't get the last one "testProduceConsumeStream" to run successfully. There ...more...
Travis Jeffery says: Yeah I missed adding an update to consume stream to close on stream.Context().Done() e.g. ```func (s *grpcServer) ConsumeStream( req *api.ConsumeRequest, stream api.Log_ConsumeStreamServer, ) error { for { select { case <-stream.Context().Done(): return nil default: res, err := s.Consume(stream.Context(), req) switch err.(type) { case nil: case api.ErrOffsetOutOfRange: continue default: return err } if err = stream.Send(res); err != nil { return err } req.Offset++ } } } ``
  • Reported in: B1.0 (15-Apr-20)
  • Fixed: 16-Apr-20, awaiting book release
#86597
PDF page: 68
Related to #86596 Problem was in the log.proto rpc ProduceStream(stream ProduceRequest) returns (ProduceResponse) {} instead of rpc Prod...more...
  • Reported in: B1.0 (27-Mar-20)
  • Fixed: 15-Apr-20, awaiting book release
#86482
PDF page: 77
The Makefile has a line with "-config=test/ca-config.json" in it, but I looked through the whole chapter and couldn't find that file. Also, on page 7...more...
Travis Jeffery says: Great catch, thanks!
  • Reported in: B1.0 (27-Mar-20)
  • Fixed: 03-Apr-20, awaiting book release
#86481
PDF page: 78
Minor suggestion - instead of calling os.Getenv twice, I like putting assignment in the "if" statement, like: func configFile(filename string) string...more...
Travis Jeffery says: Yep sounds good. Updated.
  • Reported in: B1.0 (25-May-20)
#86763
PDF page: 79
the snippet seems to require the client cert authentication: tlsConfig.ClientAuth = tls.RequireAndVerifyClientCert At this point of the book, we a...more...
  • Reported in: B1.0 (27-Mar-20)
  • Fixed: 16-Apr-20, awaiting book release
#86483
PDF page: 80
When typing in the code on page 80, it would be less work for the reader and possibly less confusion to either explicitly add the new function signatu...more...
Travis Jeffery says: Yep that was meant to be cfg, updated. Thanks!
  • Reported in: B1.0 (27-Mar-20)
  • Fixed: 15-Apr-20, awaiting book release
#86484
PDF page: 81
The new version of NewGRPCServer doesn't compile. As far as I can tell, it needs to be this: func NewGRPCServer(cfg *Config, opts ...grpc.ServerOpti...more...
  • Reported in: B1.0 (25-May-20)
#86764
PDF page: 81
func NewGRPCServer(log logger, opts ...grpc.ServerOption) *grpc.Server { there is no logger type at this point of the book. The parameter should be...more...
  • Reported in: B1.0 (28-Mar-20)
  • Fixed: 18-Apr-20, awaiting book release
#86485
PDF page: 82
At the bottom of page 82 and top of 83, the code there is identical to the code on page 80, so no changes were necessary. Additionally, tests have be...more...
  • Reported in: B1.0 (31-Mar-20)
  • Fixed: 03-Apr-20, awaiting book release
#86502
PDF page: 85
Not really sure at this point if is the setup on my machine or what. I can't compile the protobuffer. I'm on a MAc, installed go with brew. When r...more...
Travis Jeffery says: Yeah I have the wrong go get instructions on page 19. You need to run `go get github.com/gogo/protobuf/...@v1.3.1` Sorry that'll be fixed in the next beta.
  • Reported in: B1.0 (28-Mar-20)
  • Fixed: 18-Apr-20, awaiting book release
#86486
PDF page: 87
Why is "srv *grpc.Server" being added to the scenarios "for" loop when on page 86, the "srv" is not being returned from "testSetup"? Additionally, fu...more...
Travis Jeffery says: Yep should have the two clients and config instead of the server there. I began putting in the whole method and using highlights to show the diff where it makes sense too. Thanks.
  • Reported in: B1.0 (28-Mar-20)
  • Fixed: 18-Apr-20, awaiting book release
#86487
PDF page: 87
As I reported earlier, tests fail from page 81-87. I'm rather exited to report that after several changes, tests are now passing. Here is my version...more...
  • Reported in: B1.0 (28-Mar-20)
  • Fixed: 15-Apr-20, awaiting book release
#86488
PDF page: 89
Before suggesting to run "make test", it should be pointed out that a new line needs to be added to TestServer, around line 27, like this: "unauthori...more...
  • Reported in: B1.0 (28-Mar-20)
#86489
PDF page: 91
For the update of NewGRPCServer, it would be nice to show the newly-needed import paths. I'm guessing they are: grpc_middleware "github.com/grpc-ec...more...
  • Reported in: B1.0 (04-Apr-20)
  • Fixed: 15-Apr-20, awaiting book release
#86523
PDF page: 96
Paper page: 91
Placeholder left: (Other frameworks name the same concept middleware.) The paragraph starts with: "The authenticate(context.Context) function is an...more...
Travis Jeffery says: That's not a placeholder, that's just a side-note saying that other frameworks call the same thing middleware.
  • Reported in: B1.0 (04-Apr-20)
  • Fixed: 05-Apr-20, awaiting book release
#86522
PDF page: 99
The code provided in the book results in the following errors: internal/server/server.go:9:5: cannot use (*grpcServer)(nil) (type *grpcServer) as typ...more...
Travis Jeffery says: We just chatted with Arjan and this was due to a typo in his protobuf.
  • Reported in: B1.0 (04-Apr-20)
  • Fixed: 10-Apr-20, awaiting book release
#86524
PDF page: 106
Paper page: 102
Bottom of the page: there is a code snippet from file titled ServerSideServiceDiscovery/internal/discovery/membership_test.go: package is named "disc...more...
Travis Jeffery says: When you want to black box test your public api, using the separate _test package is convention.
  • Reported in: B1.0 (04-Apr-20)
  • Fixed: 12-Apr-20, awaiting book release
#86525
PDF page: 112
Paper page: 108
Upper third of the page: it says: "Append the following snippet to finish implementing replicate()", where the method name is meant to be: "join()"--O...more...
  • Reported in: B1.0 (04-Apr-20)
  • Fixed: 10-Apr-20, awaiting book release
#86526
PDF page: 112
Paper page: 108
Follow-up on #86525: replicate() method name is used 2 more times on the same page instead of "join()". The 'replicate()' method name makes a lot of s...more...
Travis Jeffery says: Yeah I changed that method name in the code back to replicate. Thanks.
  • Reported in: B1.0 (04-Apr-20)
  • Fixed: 12-Apr-20, awaiting book release
#86527
PDF page: 113
Paper page: 109

Replicator.Close() is missing on the page (referenced at page 113 (pdf page 117) by Agent.Shutdown())--Oleg Sidorov

  • Reported in: B1.0 (07-Apr-20)
  • Fixed: 15-Apr-20, awaiting book release
#86536
PDF page: 119
Paper page: 115

By the moment of agent_test implementation, package github.com/travisjeffery/proglog/internal/network is never mentioned. --Oleg Sidorov

Travis Jeffery says: Ah that should still use the config pkg. Thanks!
  • Reported in: B1.0 (11-Apr-20)
  • Fixed: 12-Apr-20, awaiting book release
#86561
PDF page: 135
Paper page: 132

fsm code listings are missing 2 method definitions: Snapshot() and Restore(1) so the resulting chapter tests wouldn't pass.--Oleg Sidorov

Travis Jeffery says: Yep, sorry I missed a code snippet. Will be in the next beta.
  • Reported in: B1.0 (11-Apr-20)
  • Fixed: 15-Apr-20, awaiting book release
#86563
PDF page: 136
Paper page: 133
In logStore.GetLog(2) definition line: out.Type = raft.LogType(in.Type) introduces a new field in api.v1.Record: type. To my best knowledge, the proto...more...
  • Reported in: B1.0 (05-Apr-20)
  • Fixed: 18-Apr-20, awaiting book release
#86528
PDF page: 256
After completing all code from chapter 8 (Discover Servers and Load Balance From the Client) I ended up getting an unsafe pointer error when running m...more...