-
Notifications
You must be signed in to change notification settings - Fork 455
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
Replace closer with resource package #2864
Merged
Merged
Changes from 2 commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
af3052a
replace closer with resource package
rallen090 2c6e8e3
replace closer with resource package 2
rallen090 e767071
lint
rallen090 45e1a49
lint 2
rallen090 1d7c8fa
test fix 1
rallen090 4ee076f
test fix 2
rallen090 372e565
lint
rallen090 e100337
normalize xresource
rallen090 e77db70
lint
rallen090 b075d34
Merge remote-tracking branch 'origin/master' into ra/close-replaced-w…
rallen090 dc9b72b
Merge remote-tracking branch 'origin/master' into ra/close-replaced-w…
rallen090 48f306b
changing close naming
rallen090 6d02b6b
Merge remote-tracking branch 'origin/master' into ra/close-replaced-w…
rallen090 c8f41bf
more lint
rallen090 ee73943
mod tidy
rallen090 8b87407
Merge remote-tracking branch 'origin/master' into ra/close-replaced-w…
rallen090 8055612
more lint 2
rallen090 d224e88
more lint 3
rallen090 e6dae4f
Merge remote-tracking branch 'origin/master' into ra/close-replaced-w…
rallen090 b27ff31
more lint
rallen090 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
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
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
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
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
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
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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,7 +38,6 @@ import ( | |
"github.com/m3db/m3/src/dbnode/persist/fs/msgpack" | ||
"github.com/m3db/m3/src/dbnode/persist/schema" | ||
idxpersist "github.com/m3db/m3/src/m3ninx/persist" | ||
xclose "github.com/m3db/m3/src/x/close" | ||
xerrors "github.com/m3db/m3/src/x/errors" | ||
"github.com/m3db/m3/src/x/ident" | ||
"github.com/m3db/m3/src/x/instrument" | ||
|
@@ -360,17 +359,6 @@ func openFiles(opener fileOpener, fds map[string]**os.File) error { | |
return firstErr | ||
} | ||
|
||
// TODO(xichen): move closeAll to m3x/close. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👏 |
||
func closeAll(closers ...xclose.Closer) error { | ||
multiErr := xerrors.NewMultiError() | ||
for _, closer := range closers { | ||
if err := closer.Close(); err != nil { | ||
multiErr = multiErr.Add(err) | ||
} | ||
} | ||
return multiErr.FinalError() | ||
} | ||
|
||
// DeleteFiles delete a set of files, returning all the errors encountered during | ||
// the deletion process. | ||
func DeleteFiles(filePaths []string) error { | ||
|
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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
I know we're not doing anything about it right now, but we'll eventually want to either (a) promote
resource
to non-x/
or (b) create per-package interfaces instead of bleedingx/
types as part of non-x/
APIs.