Minor bug fix for shell scripts in sandbox directory#898
Minor bug fix for shell scripts in sandbox directory#898lpstudy wants to merge 4 commits intobaidu:masterfrom
Conversation
(baidu#897) deploy.sh: extra x in "$1"x == "master_slave". Also add `-h` option which is common in linux shell scripts. start_bfs.sh: bfs can not work well with raft mode enabled with only sleeping 5 seconds, add 'sleep 30' when using raft mode. clear.sh: redirect the error log message like `process not found` to `/dev/null`. It does no good but confuses the users. start_bfs.sh: `cd -` print the working directory which is useless. Add the server starting message like `start nameserver0 with pid xxx`
| elif [ "$1x" == "raftx" ]; then | ||
| ns_num=3 | ||
| elif [ "$1x" == "master_slave" ]; then | ||
| elif [ "$1" == "master_slave" ]; then |
There was a problem hiding this comment.
elif [ "$1x" == "master_slavex" ]; then?
There was a problem hiding this comment.
I think each one is ok! when we use "", it is OK to use "$1"even when $1 == NULL.
Traditionally, we can use [ x$1 == x ] or [ "$1" == "" ], but combining them together seems werid.
Of course, it is my own idea.
There was a problem hiding this comment.
If possible, please solve this pull request. I am not familiar with git. And I have made a mistake, which creates the pull request from my master branch. It is really annoying.
src/flags.cc
Outdated
| DEFINE_int64(chunkserver_disk_safe_space, 5120, "If space left on a disk is less then this value, the disk will be concidered full. In MB"); | ||
| DEFINE_int32(chunkserver_disk_buf_size, 100, "Base number of buffers which are in the waiting list. Used to computer disk workload"); | ||
| DEFINE_int64(chunkserver_disk_safe_space, 5120, "If space left on a disk is less then this value, the disk will be considered full. In MB"); | ||
| DEFINE_int32(chunkserver_disk_data_store_limit_percent, 95, "If the percentage of data stored on a disk is larger than this value, the disk will be considered full. E.g. 95 means 95 percent"); |
There was a problem hiding this comment.
说实话,我不会整两个pr。 我create new pull request,但是立刻合并到这一个上面了。
There was a problem hiding this comment.
在本地新建一个分支,然后push到github上,然后再新开pr就可以了
|
|
||
| if (data_score > 0.95 || space_left < (5L << 30) || pending_score > 1.0) { | ||
| if (data_score > FLAGS_chunkserver_disk_data_store_limit_percent * 1.0 / 100 | ||
| || space_left < (5L << 30) |
There was a problem hiding this comment.
嗯,只是这样改那边肯定就冲突了,一个个来吧,先分pr就可以了
There was a problem hiding this comment.
已经建立了新的pr, 903。
旧的这个commit已经被删除了,内容扔到了新的pr中。
(#897)
deploy.sh: extra x in"$1"x == "master_slave". Also add-hoption which is common in linux shell scripts.start_bfs.sh: bfs can not work well with raft mode enabled with only sleeping 5 seconds, add 'sleep 30' when using raft mode.start_bfs.sh:cd -print the working directory which is useless. Add the server starting message likestart nameserver0 with pid xxx.clear.sh: redirect the error log message likeprocess not foundto/dev/null. It does no good but confuses the users.