Commit Graph

88 Commits

Author SHA1 Message Date
Victor1319
809d023e9e refactor(vendor): user smux in depends to replace pkg in vendor. #1000193713
Signed-off-by: Victor1319 <zengxuewei@oppo.com>
2025-08-11 17:21:16 +08:00
slasher
ecb0b49016 feat(util): add go ping for flash sdk
. #22200563

Signed-off-by: slasher <mcq.sejust@gmail.com>
2025-08-07 15:19:12 +08:00
slasher
297477a2ed chore(util): add util of bloom fliter
. #22200490

Signed-off-by: slasher <mcq.sejust@gmail.com>
2025-08-07 15:18:56 +08:00
xiejian
0c6d15042d fix(shardnode): 1.remove raft group when apply remove member
avoid removed member still leader and clear raft data after all raft log applied
2. skip load disk which status is not normal in clustermgr
3.import gomonkey package

with: #1000176986

Signed-off-by: xiejian <xiejian3@oppo.com>
2025-07-08 11:30:16 +08:00
slasher
917a57b2fd feat(rpc2): add package xxh3
. github.com/zeebo/xxh3

@formatter:off

Signed-off-by: slasher <shenjie1@oppo.com>
2025-07-08 11:30:13 +08:00
Cloudstriff
f3a83ecb47 style(shardnode): code static check and style refactor
with #22357426

Signed-off-by: Cloudstriff <chenjiongwendao@qq.com>
Signed-off-by: xiejian <xiejian3@oppo.com>
2025-07-08 11:30:12 +08:00
xiejian
eb1a280bc0 refactor(shardnode): update grpc version
with: #22409856 of #22357426

Signed-off-by: xiejian <xiejian3@oppo.com>
2025-07-08 11:30:12 +08:00
xiejian
6627d67fd5 fix(shardnode): add item interface implementation, fix code merge problems
with: #22409856 of #22357426

Signed-off-by: xiejian <xiejian3@oppo.com>
2025-07-08 11:30:12 +08:00
xiejian
75bc515d0b fix(common): update kvstorev2
with: #22409822 of #22357426

Signed-off-by: xiejian <xiejian3@oppo.com>
2025-07-08 11:30:12 +08:00
tangdeyi
b7cade30e6 fix(clustermgr): basic clustermgr dev-branch for shardnode management
1. fix refactor code and test problem
2. add clustermgr api about shardnode and space

. #22360410

Signed-off-by: tangdeyi <tangdeyi@oppo.com>
2025-07-08 11:30:12 +08:00
yhjiango
c8e92fb0f0 feat(objectnode): support local and external audit log
Signed-off-by: yhjiango <jiangyunhua@oppo.com>
2023-11-01 14:46:14 +08:00
tangdeyi
15703d2c09 refactor(objectnode): update ratelimit v1 lib
Signed-off-by: tangdeyi <tangdeyi@oppo.com>
2023-09-18 14:08:33 +08:00
tangdeyi
14f0f67c73 feat(objnode): s3 api qos
Signed-off-by: tangdeyi <tangdeyi@oppo.com>
2023-08-31 16:36:14 +08:00
JasonHu520
d8d63ded06 test(raft): add raft test file
Signed-off-by: JasonHu520 <huzongchao@oppo.com>
2023-08-30 20:05:32 +08:00
NaturalSelect
c753f80cac chore(all): add gopsutil dependence
Signed-off-by: NaturalSelect <2145973003@qq.com>
2023-08-30 20:05:32 +08:00
baijiaruo
b6019dd7df feat(ci): clear code scanning alert by Dockerfile
Signed-off-by: baijiaruo <baijiaruo@126.com>
2023-08-04 10:25:02 +08:00
sunjiapeng
424d61ad4e fix(metanode): use uniqid to deduplicate link/unlink requests, prevent inode lost
Signed-off-by: sunjiapeng <782615313@qq.com>
2023-07-20 10:58:50 +08:00
slasher
24e766dd7b chore(package): remove jacobsa's daemonize in depends
Signed-off-by: slasher <shenjie1@oppo.com>
2023-06-20 15:00:32 +08:00
pengtianyue
a35b7dcf4a refactor(common): upgrade sarama version to 1.33
Signed-off-by: pengtianyue <pengtianyue@oppo.com>
2023-06-02 17:03:10 +08:00
yuxiaobo
ac75137295 build: the build script of blobstore is merged into cubefs
1. rocksdb upgrade to 6.3.6
2. optimize the build scripts
3. fix build errors
4. add env variable for blobstore unit test
5. update git ignore file to ignore build and test result
6. modify open files limit for unit test

Signed-off-by: yuxiaobo <yuxiaobo@oppo.com>
Signed-off-by: slasher <shenjie1@oppo.com>
Signed-off-by: Victor1319 <834863182@qq.com>
2023-05-23 15:24:53 +08:00
tianjiongzhang
adef8cf191 feat(client): add block cache sync.
Signed-off-by: tianjiongzhang <236556116@qq.com>
2023-03-04 16:13:35 +08:00
leonrayang
d792fb5ee2 update: update vendor referenced by blobstore and other lib
Signed-off-by: leonrayang <chl696@sina.com>
2022-04-13 15:57:55 +08:00
leonrayang
2a67ed4104 feature: enable go mod and update vendor
1. add chubaofs-blobstore client
 2. move origin modified vendor code to depends
    1) raft
    2) spf13
    3) fuse
    3) jacobsa
    4) rocksdb

Signed-off-by: leonrayang <chl696@sina.com>
2022-04-13 15:57:55 +08:00
Sheng Yong
fa72d3417f fix: Fix logger.Error format
Fix the following error message:

2022-02-18 12:35:22,026 transport_heartbeat.go๐Ÿ’ฏ [ERROR] [heartbeatTransport] recive message from conn error
%!(EXTRA string=read tcp 192.168.0.31:17330->192.168.0.34:39830: read: connection reset by peer)
^^^^^^^^

Signed-off-by: Sheng Yong <shengyong2021@gmail.com>
2022-02-18 18:13:05 +08:00
leonrayang
2970e2c3d1 update. go import path change from chubaofs to cubefs
Signed-off-by: leonrayang <chl696@sina.com>
2022-01-25 18:17:02 +08:00
Sheng Yong
5c20bc510d fuse: Integrate fdstore into cfs-client
This patch integrate fdstore into cfs-client, and adds 2 more options
for cfs-client:
 -p <port>: pprof port of old cfs-client
 -n: dynamic unix domain socket file name

If we are trying to live upgrade cfs-client, the following command
could be used:

	cfs-client -c <config json file path> -p <pprof port> -r

Signed-off-by: Sheng Yong <shengyong2021@gmail.com>
2022-01-14 12:54:21 +08:00
Sheng Yong
9392566a4b fuse: Add restore
This patch adds a new option '-r [UDS]' for restore cfs-client's fuse.
If restore is enabled, cfs-client will not mount a new fuse. Instead,
it receive fuse dev fd from UDS, and load serveNodes and serveHandles
from locale files. After that, cfs-client continue reading requests
from /dev/fuse.

Signed-off-by: Sheng Yong <shengyong2021@gmail.com>
2022-01-14 12:53:54 +08:00
Sheng Yong
98ac080f2a fuse: Add suspend/resume
This patch addes two http handler "/suspend" and "/resume".

**suspend**
Suspend has one paremeter, which is a Unix Domain Socket used to send
fd. Suspend stops reading more request from /dev/fuse. It waits all
handling requests to finish, then saves serveNodes and serveHandles to
locale files ("/tmp/ChubaoFS-fuse-Nodes.list" and "/tmp/ChubaoFS-fuse-
Handles.list" by default). After that, cfs-client exits.

**resume**
Resume could stop Suspend before cfs-client exists.

Signed-off-by: Sheng Yong <shengyong2021@gmail.com>
2022-01-14 12:52:02 +08:00
Sheng Yong
77a8148129 go-fuse: Fix incorrect NodeID in serveHandle
LookupRequest gets new child, the child's NodeID should be saved in the
serveHandle but not parent's NodeID.

Signed-off-by: Sheng Yong <shengyong2021@gmail.com>
2022-01-14 12:52:02 +08:00
leonrayang
bb3e70cc88 fix.in function of follower read,leader and follower sync message through raft log, if entry too large to send
This bug lead send dp partitions cache from leader to follower be hang and follower recive update expired.
follower will redirect client/partitions request to leader,this can be easy tigger when dp partitions is large such as 10MB.
stable and unstable log entry send in different ways,unstage will send 1 entry if entry large then config.
but stable entries dealling method don't do that and print no message.
leader send to follower dp partititions which make a entry which is large then config size,in some senorio entry is in stable entires
fix bug use the ways of unstable entries dealling.

Signed-off-by: leonrayang <chl696@sina.com>
2021-12-14 14:37:46 +08:00
Victor1319
dfb3f91f30 fix: process heartbeat req & resp in async way to avoid dead lock
Signed-off-by: Victor1319 <834863182@qq.com>
2021-12-13 19:41:25 +08:00
Victor1319
0906ea75ed enhance: support disk, datanode, metanode decommission
Signed-off-by: Victor1319 <834863182@qq.com>
2021-12-13 19:26:45 +08:00
leonrayang
7429730e76 fix: remove redundant memcopy when reading raft snapshot
This commit removes the redundant memcopy when reading raft snapshot.
The redundant memcopy makes reading snapshot very slow which leads to
snapshot send failure.

Signed-off-by: leonrayang <chl696@sina.com>
Reviewd-by: Shuoran Liu <shuoranliu@gmail.com>
2021-11-17 15:56:41 +08:00
Sheng Yong
54901d45da bazil.org/fuse: Add HandleReadDirer to read partial sub-dirents
This patch introduces an Interface HandleReadDirer, which implements
ReadDir to read partial sub-dirents accroding to request offset and
size.

From now on, readdir could be implemented in two ways:
 * ReaddirAll reads all sub-dirents one time
 * Readdir reads partial sub-dirents and the caller needs to call
   it multple times if more sub-dirents are requested
 * If both are implemented, Readdir is used

Signed-off-by: Sheng Yong <shengyong2021@gmail.com>
2021-10-18 11:45:07 +08:00
Victor1319
539d3bfc7b enhance: check size when read data from heartbeat port
This commit blocks messages of which the size is larger than 256M
to avoid consuming abnormally large memory due to network port scanners.

Signed-off-by: Victor1319 <834863182@qq.com>
2021-09-15 12:16:41 +08:00
Shuoran Liu
c8c848b6ea
Merge pull request #1178 from Victor1319/client
enchance: support push monitor data to gateway
2021-07-20 08:51:19 +08:00
Victor1319
1cf43fb24e enhance: import prometheus push vendor
Signed-off-by: Victor1319 <834863182@qq.com>
2021-07-12 14:42:10 +08:00
Justice
72f035645e feature: add gencfg command for cli to generate cluster config by yaml
Signed-off-by: Justice <zhengyi.zhu.hust@gmail.com>
2021-07-12 11:13:39 +08:00
xrefft
84ef5d0421 vendor: add smux
Signed-off-by: xrefft <cserxiao@qq.com>
Signed-off-by: mingwei <gongwilliam@163.com>
2021-04-02 16:53:55 +08:00
Mervin
ffd148e745
Merge pull request #1093 from xrefft/bugfix/fix-raft-monitor-panic-error#1069
Bugfix/fix raft monitor panic error#1069
2021-02-04 18:31:13 +08:00
Shuoran Liu
b83ec35f79 vendor: introduce willf bitset package
Signed-off-by: Shuoran Liu <shuoranliu@gmail.com>
2021-01-28 14:37:33 +08:00
xrefft
39ff7ee12b
fix: raft monitor concurrency unsafe
raft.monitor is not concurrency safe. So we introduce the Monitor interface as an alternative.

fix #1069

Signed-off-by: xrefft <cserxiao@qq.com>
2021-01-25 15:36:39 +08:00
Mofei Zhang
abe776d33f Enhancement: auto fix crc-mismatched raft log crc
The last Log file of Raft is in an unindexed state, and Raft will traverse
the file to rebuild the index during the startup process.

When the process was shut down abnormally last time (for example, shut down
by kill -9), the log file data may be incomplete.

This improvement allows raft to perform a truncation operation if an incomplete
log entry is encountered during the indexing process of the last log file,
and the log is truncated to the most recent complete and valid log entry.

Signed-off-by: Mofei Zhang <mofei2816@gmail.com>
2021-01-18 17:17:51 +08:00
Victor1319
0b663cd123 fix data node raftstatus's active value
Signed-off-by: Victor1319 <834863182@qq.com>
2020-12-28 15:33:16 +08:00
awzhgw
cf7fbde1f5
Revert "Sync from release-20200720" 2020-11-11 14:23:59 +08:00
awzhgw
b230b7107d Sync changes from release-20200720 branch.
Signed-off-by: awzhgw <guowl18702995996@gmail.com>
Signed-off-by: xuxihao1 <xuxihao3@jd.com>
Signed-off-by: Mofei Zhang <mofei2816@gmail.com>
2020-11-09 16:03:42 +08:00
wenjia322
514852b540 enhancement: clean up the raft log when the remaining space is insufficient; limit size of raft logs and rotate
Signed-off-by: wenjia322 <buaa1214wwj@126.com>
2020-10-13 18:29:09 +08:00
wenjia322
4a780bb323 fix: limit deleted raft log name
Signed-off-by: wenjia322 <buaa1214wwj@126.com>
2020-09-18 18:30:43 +08:00
wenjia322
245720eefe enhancement: only keep raft logs from the past 7 days
Signed-off-by: wenjia322 <buaa1214wwj@126.com>
2020-09-18 14:14:42 +08:00
yinlei-jinan
ce7ec0452f add posix acl enable config for client
Signed-off-by: yinlei-jinan <297155992@qq.com>
2020-09-16 18:59:36 +08:00