-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
graph: batch quads automatically if caller uses single AddQuad on writer
- Loading branch information
Showing
1 changed file
with
18 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a420e62
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dennwc This commit seems to have broken writing structs directly into the graph. I haven't looked too much into it but recently my tests were failing. Essentially, my graph would be populated using commits before this one and my graph would be empty on this commit and current master (a50a6ef)
A sample of how I am writing structs to the graph is here (https://github.com/edfungus/conduction/blob/master/storage/storage.go#L76)
I can also make an issue too if you would like
a420e62
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@edfungus The reason the storage is empty is because Writer does internal buffering now and needs to be closed to write it to the storage. It's similar to
bufio.Writer
in this regard. Creating a new writer has a very small overhead, so you can make a new one each time you want to write a chunk of data.But we should document it better, I guess, or expose a
Flush
method.