This commit is contained in:
Chris Lu 2020-10-24 20:12:04 -07:00
parent 326a4bbaf5
commit da36abf033
5 changed files with 5 additions and 5 deletions

View file

@ -90,7 +90,7 @@ func runMaster(cmd *Command, args []string) bool {
grace.SetupProfiling(*masterCpuProfile, *masterMemProfile)
parent, _ := util.FullPath(*m.metaFolder).DirAndName()
if util.FileExists(string(parent)) && !util.FileExists(*m.metaFolder){
if util.FileExists(string(parent)) && !util.FileExists(*m.metaFolder) {
os.MkdirAll(*m.metaFolder, 0755)
}
if err := util.TestFolderWritable(util.ResolvePath(*m.metaFolder)); err != nil {

View file

@ -14,7 +14,7 @@ import (
var (
concurrentWriterLimit = runtime.NumCPU()
concurrentWriters = util.NewLimitedConcurrentExecutor(4 * concurrentWriterLimit)
concurrentWriters = util.NewLimitedConcurrentExecutor(4 * concurrentWriterLimit)
)
type ContinuousDirtyPages struct {

View file

@ -95,7 +95,7 @@ func (c *ContinuousIntervals) AddInterval(data []byte, offset int64) {
// append to the tail and return
if len(c.lists) == 1 {
lastSpan := c.lists[0]
if lastSpan.Tail.Offset + lastSpan.Tail.Size == offset {
if lastSpan.Tail.Offset+lastSpan.Tail.Size == offset {
lastSpan.addNodeToTail(interval)
return
}

View file

@ -126,7 +126,7 @@ func (fh *FileHandle) readFromChunks(buff []byte, offset int64) (int64, error) {
totalRead, err := fh.f.reader.ReadAt(buff, offset)
if err != nil && err != io.EOF{
if err != nil && err != io.EOF {
glog.Errorf("file handle read %s: %v", fh.f.fullpath(), err)
}

View file

@ -67,7 +67,7 @@ func (s3a *S3ApiServer) PutBucketHandler(w http.ResponseWriter, r *http.Request)
}); err != nil {
glog.Errorf("list collection: %v", err)
return fmt.Errorf("list collections: %v", err)
}else {
} else {
for _, c := range resp.Collections {
if bucket == c.Name {
errCode = s3err.ErrBucketAlreadyExists