-
Notifications
You must be signed in to change notification settings - Fork 6k
*: Import Into support full-text index using TiCI #61760
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
Changes from 29 commits
3a07c33
fbf9e07
6fd2b3f
96d2377
f143800
74736bc
0556ac4
946109c
f093f00
66229de
1d4bb68
c3449f0
48b68a6
e99f771
c979b1f
9e5412b
c549b6e
67576de
bfb31af
885f1ef
3f8b2a3
44d9caa
2d7298c
2cf1dfe
1cf9ccd
f154934
124d3ca
c4a0476
1a11d39
688fdd3
e897010
ee98127
55b511c
b111662
f79352e
9c590f2
7fbdf13
23bcc01
ae863a3
ad0aa76
aea1fae
d941ffe
a9e7c71
3dfded6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -47,6 +47,7 @@ import ( | |||||
"github.com/pingcap/tidb/pkg/resourcegroup" | ||||||
"github.com/pingcap/tidb/pkg/session/cursor" | ||||||
"github.com/pingcap/tidb/pkg/sessionctx/vardef" | ||||||
"github.com/pingcap/tidb/pkg/tici" | ||||||
util2 "github.com/pingcap/tidb/pkg/util" | ||||||
"github.com/pingcap/tidb/pkg/util/dbterror" | ||||||
"github.com/pingcap/tidb/pkg/util/engine" | ||||||
|
@@ -1345,11 +1346,11 @@ func GetTiFlashStoresStat(ctx context.Context) (*pdhttp.StoresInfo, error) { | |||||
|
||||||
// CreateFulltextIndex create fulltext infex on TiCI. | ||||||
func CreateFulltextIndex(ctx context.Context, tblInfo *model.TableInfo, indexInfo *model.IndexInfo, schemaName string) error { | ||||||
ticiManager, err := NewTiCIManager("0.0.0.0", "50061") | ||||||
ticiManager, err := tici.NewTiCIManager("0.0.0.0", "50061") | ||||||
if err != nil { | ||||||
return err | ||||||
} | ||||||
defer ticiManager.conn.Close() | ||||||
defer ticiManager.Conn.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.
Suggested change
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. |
||||||
return ticiManager.CreateFulltextIndex(ctx, tblInfo, indexInfo, schemaName) | ||||||
} | ||||||
|
||||||
|
@@ -1637,3 +1638,33 @@ func (is *InfoSyncer) setDynamicServerInfo(ds *DynamicServerInfo) { | |||||
} | ||||||
is.info.Store(newInfo) | ||||||
} | ||||||
|
||||||
// GetCloudStoragePath requests the S3 path from TiCI Meta Service for a baseline shard upload. | ||||||
func GetCloudStoragePath( | ||||||
Benjamin2037 marked this conversation as resolved.
Show resolved
Hide resolved
D3Hunter marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
ctx context.Context, | ||||||
tblInfo *model.TableInfo, | ||||||
indexInfo *model.IndexInfo, | ||||||
schemaName string, | ||||||
lowerBound, upperBound []byte, | ||||||
) (string, error) { | ||||||
ticiManager, err := tici.NewTiCIManager("0.0.0.0", "50061") | ||||||
D3Hunter marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
if err != nil { | ||||||
return "", err | ||||||
} | ||||||
defer ticiManager.Conn.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. doitto 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. Same as above. |
||||||
return ticiManager.GetCloudStoragePath(ctx, tblInfo, indexInfo, schemaName, lowerBound, upperBound) | ||||||
} | ||||||
|
||||||
// MarkTableUploadFinished notifies TiCI Meta Service that the whole table/index upload is finished. | ||||||
func MarkTableUploadFinished( | ||||||
ctx context.Context, | ||||||
tableID int64, | ||||||
indexID int64, | ||||||
) error { | ||||||
ticiManager, err := tici.NewTiCIManager("0.0.0.0", "50061") | ||||||
if err != nil { | ||||||
return err | ||||||
} | ||||||
defer ticiManager.Conn.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. doitto 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. Same as above. |
||||||
return ticiManager.MarkTableUploadFinished(ctx, tableID, indexID) | ||||||
} |
|
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.