Skip to content
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

fix: fix crash after query of map/path #129

Merged
merged 1 commit into from
Nov 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions ccore/nebula/gateway/dao/dao.go
Original file line number Diff line number Diff line change
Expand Up @@ -237,23 +237,23 @@ func getMapInfo(valWarp *wrapper.ValueWrapper, _verticesParsedList *list, _edges
for _, v := range valueMap {
vType := v.GetType()
if vType == "vertex" {
var _props map[string]types.Any
_props := make(map[string]types.Any)
_props, err = getVertexInfo(&v, _props)
if err == nil {
*_verticesParsedList = append(*_verticesParsedList, _props)
} else {
return err
}
} else if vType == "edge" {
var _props map[string]types.Any
_props := make(map[string]types.Any)
_props, err = getEdgeInfo(&v, _props)
if err == nil {
*_edgesParsedList = append(*_edgesParsedList, _props)
} else {
return err
}
} else if vType == "path" {
var _props map[string]types.Any
_props := make(map[string]types.Any)
_props, err = getPathInfo(&v, _props)
if err == nil {
*_pathsParsedList = append(*_pathsParsedList, _props)
Expand Down Expand Up @@ -302,8 +302,8 @@ func Disconnect(nsid string) error {
}

/*
executes the gql based on nsid,
and returns result, the runtime panic error and the result error.
executes the gql based on nsid,
and returns result, the runtime panic error and the result error.
*/
func Execute(nsid string, gql string, paramList types.ParameterList) (ExecuteResult, interface{}, error) {
result := ExecuteResult{
Expand Down
7 changes: 4 additions & 3 deletions service/importer/importer.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ package importer
import (
"errors"
"fmt"
"github.com/vesoft-inc/nebula-importer/pkg/logger"
"path/filepath"
"time"

"github.com/vesoft-inc/nebula-importer/pkg/logger"

"github.com/astaxie/beego"
"github.com/astaxie/beego/logs"
"github.com/vesoft-inc/nebula-importer/pkg/config"
Expand Down Expand Up @@ -135,7 +136,7 @@ func actionQuery(taskID string, result *ActionResult) {
}

/*
`actionQueryAll` will return all tasks with status Aborted or Processing
`actionQueryAll` will return all tasks with status Aborted or Processing
*/
func actionQueryAll(result *ActionResult) {
taskIDs := GetTaskMgr().GetAllTaskIDs()
Expand All @@ -159,7 +160,7 @@ func actionStop(taskID string, result *ActionResult) {
}

/*
`actionStopAll` will stop all tasks with status Processing
`actionStopAll` will stop all tasks with status Processing
*/
func actionStopAll(result *ActionResult) {
taskIDs := GetTaskMgr().GetAllTaskIDs()
Expand Down