Skip to content

brainhivenl/training-sync

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Exercise: Fix the DNS Cache

A colleague wrote a concurrent DNS cache. It seems to work locally but behaves unpredictably in production — sometimes it resolves all domains, sometimes only a few, and occasionally it crashes entirely.

Your job is to find and fix all concurrency bugs.

Getting started

Run the program:

go run .

Run the tests:

go test -race -count=1 ./...

Check for common issues:

go vet ./...

Rules

  • Do not change the test file
  • All tests must pass with -race
  • go vet must report no issues
  • The program must always resolve all domains

Hints

  • There are 4 distinct issues in main.go
  • The race detector and go vet will help you find them

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages