-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(storage/flux): fix the empty call for storage/flux (#18446)
The tables produced by `storage/flux` didn't previously pass our table tests. The `Empty()` call is supposed to return false if the table was ever not empty, but reading the table or calling `Done()` would cause the table implementations here to return that they were always empty. This messes up the csv encoder which then believes that it just emitted an empty table. The table tests for valid table implementations states that this is an error for the table implementation. This change introduces a simple test for `ReadFilter` and also runs the table tests on the filter iterator.
- Loading branch information
1 parent
e8fe3c9
commit 1d5a7bf
Showing
5 changed files
with
212 additions
and
19 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
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package storageflux | ||
|
||
import "sync/atomic" | ||
|
||
func (t *table) IsDone() bool { | ||
return atomic.LoadInt32(&t.used) != 0 | ||
} |
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