-
Notifications
You must be signed in to change notification settings - Fork 688
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9b32e4f
commit f321aad
Showing
4 changed files
with
38 additions
and
35 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,12 +23,12 @@ import ( | |
"github.com/blevesearch/bleve/v2/geo" | ||
segment "github.com/blevesearch/scorch_segment_api/v2" | ||
|
||
zapv16 "github.com/blevesearch/zapx" | ||
zapv11 "github.com/blevesearch/zapx/v11" | ||
zapv12 "github.com/blevesearch/zapx/v12" | ||
zapv13 "github.com/blevesearch/zapx/v13" | ||
zapv14 "github.com/blevesearch/zapx/v14" | ||
zapv15 "github.com/blevesearch/zapx/v15" | ||
zapv16 "github.com/blevesearch/zapx/v16" | ||
Check failure on line 31 in index/scorch/segment_plugin.go GitHub Actions / test (1.18.x, ubuntu-latest)
Check failure on line 31 in index/scorch/segment_plugin.go GitHub Actions / test (1.19.x, ubuntu-latest)
Check failure on line 31 in index/scorch/segment_plugin.go GitHub Actions / test (1.19.x, macos-latest)
Check failure on line 31 in index/scorch/segment_plugin.go GitHub Actions / test (1.20.x, ubuntu-latest)
|
||
) | ||
|
||
// SegmentPlugin represents the essential functions required by a package to plug in | ||
|
@@ -113,11 +113,15 @@ func SupportedSegmentTypeVersions(typ string) (rv []uint32) { | |
func chooseSegmentPlugin(forcedSegmentType string, | ||
forcedSegmentVersion uint32) (SegmentPlugin, error) { | ||
|
||
// TBD: zap v16 can support the older file formats as well, however | ||
// it breaks the TestForceVersion unit test in scorch_test.go | ||
// commenting the code below to avoid any breakages. | ||
// | ||
// v16 and above are able to handle upgrade scenarios, so no need to load | ||
// the force load the older plugins | ||
if defaultSegmentPlugin.Version() >= 16 { | ||
return defaultSegmentPlugin, nil | ||
} | ||
// if defaultSegmentPlugin.Version() >= 16 { | ||
// return defaultSegmentPlugin, nil | ||
// } | ||
|
||
if versions, ok := supportedSegmentPlugins[forcedSegmentType]; ok { | ||
if segPlugin, ok := versions[uint32(forcedSegmentVersion)]; ok { | ||
|
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