Skip to content
This repository has been archived by the owner on Jul 6, 2022. It is now read-only.

Commit

Permalink
add runtime.Gosched() to store method
Browse files Browse the repository at this point in the history
  • Loading branch information
af913337456 committed Oct 19, 2021
1 parent f79bf40 commit 7497b1c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 0 additions & 1 deletion cmd/main.go
Expand Up @@ -159,7 +159,6 @@ func runServer(ctx *cli.Context) error {
}
}
}
runtime.Gosched()
time.Sleep(time.Second)
}
}()
Expand Down
2 changes: 2 additions & 0 deletions parser/handler/common.go
Expand Up @@ -6,6 +6,7 @@ import (
"fmt"
"github.com/DeAccountSystems/das_commonlib/common/rocksdb"
"github.com/tecbot/gorocksdb"
"runtime"
)

/**
Expand Down Expand Up @@ -165,6 +166,7 @@ func storeAccountInfoToRocksDb(db *gorocksdb.DB, writeBatch *gorocksdb.WriteBatc
log.Info(fmt.Sprintf(
"storeAccountInfoToRocksDb, add new item, account: %s, id: %s, owner: %s",
item.AccountData.Account, item.AccountData.AccountIdHex, item.AccountData.OwnerLockArgsHex))
runtime.Gosched()
putsItem(ownerLockArgsHexKey, &item, &newList)
}
}
Expand Down

0 comments on commit 7497b1c

Please sign in to comment.