-
Notifications
You must be signed in to change notification settings - Fork 82
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
leveldb.Open() causes to stop writing to file #23
Comments
Hm, please provide a code sample demonstrating this. (I'm very much inclined to believe this is not the case but am willing to look at a reproduction!) |
If you're wondering why I'm skeptical, it's because Open is a very obvious and simple function without magic in it. If you've got a copy of levigo in your own repo, I'm inclined to suspect there were edits made in it that are not in the original. The definition of Open is very, very simple with no mention of log, much less log.SetOutput: Line 74 in a00f670
|
I think its probably irrelevant how simple your Open function is, and This is the code with issues, but it is very complex and I don't have time On Thu, May 8, 2014 at 11:31 PM, Jeff Hodges notifications@github.comwrote:
Colleen Josephson |
And I'm not implying you should dig to debug it, but I figured I'd post On Thu, May 8, 2014 at 11:58 PM, Colleen Josephson cjoseph@mit.edu wrote:
Colleen Josephson |
Definitely willing to believe even if we don't agree about how C++ and Go treat OS file descriptors. In any case, we just need a repro. Another alternate hypothesis: another goroutine is racing on the SetOutput or similar. In fact, I see 8 different places where SetOutput is used in that repo. This isn't recommended usage of the log API. SetOutput is global for everyone and meant to be called just once at boot. An alternative is to pass in a logging object to the things that need it. I'm going to close this. If you're able to provide a reproduction, please feel free to reopen. |
What steps will reproduce the problem?
4.) log some more stuff, but now it doesn't show up in file f
What is the expected output? What do you see instead?
logging should continue after the db is opened, but it doesn't.
There is a workaround, where you can call log.SetOutput() again just after leveldb.Open() and logging resumes.
What version of the product are you using? On what operating system?
go 1.2.1 on amd64 ubuntu 14.04, with leveldb from github on 04/28/14 (sorry, commit # missing as the files were copied to a new repo)
The text was updated successfully, but these errors were encountered: