Skip to content

Ch. 8, Hexagonal Architecture, Restore() func not properly loading existing data. #10

Description

@adamwoolhether

Just wanted to inquire if anyone else Is having trouble with getting the FileLogger to load an existing log file.

If there is no existing file, I can run the program fine, it creates the log file, and writes to the file.

The problem lies in trying to run the program again, in which it hangs.

I've traced the problem to getting stuck the the Restore() function's for loop:

	for ok && err == nil {
		select {
		case err, ok = <-errors:
		case e, ok = <-events:
			switch e.EventType {
			case EventDelete:
				err = store.Delete(e.Key)
				count++
			case EventPut:
				err = store.Put(e.Key, e.Value)
				count++
			}
		}
	}

It's driving me crazy, wanted to see if anyone else had similar issues, or any idea on how to properly debug the issue.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions