Skip to content

Commit

Permalink
bug fixes in shared index
Browse files Browse the repository at this point in the history
  • Loading branch information
Zahoor Mohamed committed Feb 8, 2021
1 parent 9a3419d commit 4318dbf
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion cmd/dfs/cmd/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ func startHttpService(logger logging.Logger) {
// starting the pprof server
go func() {
logger.Infof("fairOS-dfs pprof listening on port: %v", pprofPort)
err := http.ListenAndServe("localhost:" + pprofPort, nil)
err := http.ListenAndServe("localhost:"+pprofPort, nil)
if err != nil {
logger.Errorf("pprof listenAndServe: %v ", err.Error())
return
Expand Down
1 change: 0 additions & 1 deletion pkg/api/pod_open.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ func (h *Handler) PodOpenHandler(w http.ResponseWriter, r *http.Request) {
// so allow even if it is not set
password := r.FormValue("password")


// get values from cookie
sessionId, err := cookie.GetSessionIdFromCookie(r)
if err != nil {
Expand Down
3 changes: 0 additions & 3 deletions pkg/collection/document.go
Original file line number Diff line number Diff line change
Expand Up @@ -1188,9 +1188,6 @@ func (d *Document) DocBatchPut(docBatch *DocBatch, doc []byte, index int64) erro
switch v := v.(type) {
case float64:
if field == DefaultIndexFieldName {
if v == 2093751843 {
fmt.Println("debug")
}
valStr1 = fmt.Sprintf("%d", int64(v))
} else {
valStr1 = fmt.Sprintf("%020.20g", v)
Expand Down
3 changes: 2 additions & 1 deletion pkg/collection/index.go
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,8 @@ func longestCommonPrefix(str1, str2 string) (string, string, string) {
func getRootManifestOfIndex(actualIndexName string, fd *feed.API, user utils.Address, client blockstore.Client) *Manifest {
var manifest Manifest
topic := utils.HashString(actualIndexName)
_, addr, err := fd.GetFeedData(topic, user)
addr, _, err := fd.GetFeedData(topic, user)
fmt.Println(addr)
if err != nil {
return nil
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/file/reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -253,13 +253,13 @@ func (r *Reader) ReadLine() ([]byte, error) {
buf := make([]byte, r.blockSize)
n, err := r.Read(buf)
if err != nil {
if errors.Is(err, io.EOF){
if errors.Is(err, io.EOF) {
if buf[n-1] != '\n' {
return nil, err
} else {
goto SUCC
}
}
}
return nil, err
}
SUCC:
Expand Down

0 comments on commit 4318dbf

Please sign in to comment.