diff --git a/core/topn.go b/core/topn.go index 2ef0c0cc9..38226d957 100644 --- a/core/topn.go +++ b/core/topn.go @@ -104,11 +104,9 @@ func (self *Service) TopFillHandler(msg *db.Message) { //in order for this to ge if err != nil { log.Println("TopFileHandler:", err) } - // sendmsg := new(db.Message) - // sendmsg.Data = query.BaseQueryResult{Id: &topfill.QueryId, Data: topn} - //sendmsg := db.Message{Data: &query.BaseQueryResult{Id: &topfill.QueryId, Data: topn}} - //self.Transport.Send(&sendmsg, &topfill.ReturnProcessId) - self.Hold.Set(&topfill.QueryId, topn, 30) + + result_message := db.Message{Data: query.FillResult{&query.BaseQueryResult{Id: &topfill.QueryId, Data: topn}}} + self.Transport.Send(&result_message, &topfill.ReturnProcessId) } func SendRequest(process_id util.GUID, t *Task, service *Service) { diff --git a/query/planner.go b/query/planner.go index 59aa46abd..0f9fe1f6a 100644 --- a/query/planner.go +++ b/query/planner.go @@ -366,6 +366,7 @@ func init() { gob.Register(DifferenceQueryResult{}) gob.Register(CountQueryResult{}) gob.Register(TopNQueryResult{}) + gob.Register(FillResult{}) gob.Register(SetQueryStep{}) gob.Register(GetQueryStep{}) @@ -732,3 +733,7 @@ func (qt *RangeQueryTree) getLocation(d *db.Database) (*db.Location, error) { } return fragment.GetLocation(), nil } + +type FillResult struct { + *BaseQueryResult +}