Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
2
210310676
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Summer2021
210310676
Commits
cf8953a3
Commit
cf8953a3
authored
3 years ago
by
Cai Zhang 【张财】
Committed by
zhenshan.cao
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Add log for indexservice (#5754)
Signed-off-by:
xiaocai2333
<
cai.zhang@zilliz.com
>
parent
fceba63a
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
internal/indexservice/indexservice.go
+1
-1
1 addition, 1 deletion
internal/indexservice/indexservice.go
internal/indexservice/node_mgr.go
+2
-0
2 additions, 0 deletions
internal/indexservice/node_mgr.go
internal/indexservice/task.go
+3
-1
3 additions, 1 deletion
internal/indexservice/task.go
with
6 additions
and
2 deletions
internal/indexservice/indexservice.go
+
1
−
1
View file @
cf8953a3
...
...
@@ -318,6 +318,7 @@ func (i *IndexService) BuildIndex(ctx context.Context, req *indexpb.BuildIndexRe
ret
.
Status
.
Reason
=
err
.
Error
()
return
ret
,
nil
}
log
.
Debug
(
"IndexService BuildIndex Enqueue successfully"
,
zap
.
Any
(
"IndexBuildID"
,
indexBuildID
))
err
=
t
.
WaitToFinish
()
if
err
!=
nil
{
...
...
@@ -611,7 +612,6 @@ func (i *IndexService) assignTasksServerStart() error {
if
err
=
i
.
addNode
(
session
.
ServerID
,
req
);
err
!=
nil
{
log
.
Debug
(
"IndexService"
,
zap
.
Any
(
"IndexService start find node fatal, err = "
,
err
))
}
}
var
serverIDs
[]
int64
for
_
,
session
:=
range
sessions
{
...
...
This diff is collapsed.
Click to expand it.
internal/indexservice/node_mgr.go
+
2
−
0
View file @
cf8953a3
...
...
@@ -36,6 +36,8 @@ func (i *IndexService) addNode(nodeID UniqueID, req *indexpb.RegisterNodeRequest
i
.
nodeLock
.
Lock
()
defer
i
.
nodeLock
.
Unlock
()
log
.
Debug
(
"IndexService addNode"
,
zap
.
Any
(
"nodeID"
,
nodeID
),
zap
.
Any
(
"node address"
,
req
.
Address
))
if
i
.
nodeClients
.
CheckAddressExist
(
req
.
Address
)
{
log
.
Debug
(
"IndexService"
,
zap
.
Any
(
"Node client already exist with ID:"
,
nodeID
))
return
nil
...
...
This diff is collapsed.
Click to expand it.
internal/indexservice/task.go
+
3
−
1
View file @
cf8953a3
...
...
@@ -107,12 +107,13 @@ func (it *IndexAddTask) OnEnqueue() error {
}
func
(
it
*
IndexAddTask
)
PreExecute
(
ctx
context
.
Context
)
error
{
log
.
Debug
(
"IndexService IndexAddTask PreExecute"
,
zap
.
Any
(
"IndexBuildID"
,
it
.
indexBuildID
))
it
.
req
.
IndexBuildID
=
it
.
indexBuildID
return
nil
}
func
(
it
*
IndexAddTask
)
Execute
(
ctx
context
.
Context
)
error
{
log
.
Debug
(
"IndexService"
,
zap
.
Any
(
"
BuildIndex,
IndexBuildID
=
"
,
it
.
indexBuildID
))
log
.
Debug
(
"IndexService
IndexAddTask Execute
"
,
zap
.
Any
(
"IndexBuildID"
,
it
.
indexBuildID
))
err
:=
it
.
table
.
AddIndex
(
it
.
indexBuildID
,
it
.
req
)
if
err
!=
nil
{
return
err
...
...
@@ -121,5 +122,6 @@ func (it *IndexAddTask) Execute(ctx context.Context) error {
}
func
(
it
*
IndexAddTask
)
PostExecute
(
ctx
context
.
Context
)
error
{
log
.
Debug
(
"IndexService IndexAddTask PostExecute"
,
zap
.
Any
(
"IndexBuildID"
,
it
.
indexBuildID
))
return
nil
}
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment