Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Perf metric #2972

Closed
wants to merge 44 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
f3b2fac
[fix]tools-v2: add version in function NewQuerySubUri
baytan0720 Nov 3, 2023
4560de3
Fix metaserver deadlock caused by bthread coroutine switching
wu-hanqing Oct 31, 2023
73f7465
curvefs/client: fix memory leak of memcached
wuhongsong Nov 6, 2023
81ba96d
curvefs/client: fix unittest failed
wuhongsong Nov 7, 2023
3868bd9
docker: added dockerfile for build in ubuntu22.
Wine93 Nov 1, 2023
cd5c605
build: fixed missing some compile params for building curvefs sdk.
Wine93 Nov 1, 2023
82714da
curvefs/sdk: add maven build plugin,optimize the logic of parsing inp…
fine97 Nov 8, 2023
fbbf6fd
[fix]curvefs/client: warmup process
Cyber-SiKu Nov 8, 2023
bc3825b
tools-v2: fix update fs bug
h0hmj Nov 10, 2023
0185b8e
[fix]curvefs/client: diskcache may deadlock
Cyber-SiKu Nov 10, 2023
7023269
fix(util): stop write log to stderr, when FLAGS_logtostderr is false
NaturalSelect Nov 9, 2023
5880686
add bs stop snapshot
ZackSoul Nov 2, 2023
320b1c5
[fix] curvefs: mds: createfs error
201341 Oct 10, 2023
ed8a423
curvefs/client: too many logs
wuhongsong Nov 16, 2023
9854f58
[feat] curvefs: merge two rpc into one when delete dentry
201341 Sep 7, 2023
bee6e30
[fix] fix entrypoint bug for monitor role
caoxianfei1 Nov 16, 2023
7a94412
[fix]tools-v2: panic when show cluster status
montaguelhz Nov 12, 2023
1395ef3
fix read config
Ziy1-Tan Nov 18, 2023
305d8df
[fix] fix the error that modify diskTrimCheckIntervalSec on the fly
caoxianfei1 Nov 17, 2023
d6b08ba
script: fix typo.
Wine93 Nov 19, 2023
e49678e
curvefs/client: fix the delayed inode not being retrieved in nocto sc…
Wine93 Nov 19, 2023
a91f055
fix ut test bug
YunhuiChen Nov 20, 2023
2741e08
change docs website
aspirer Nov 21, 2023
7820c55
doc: add changelog for v2.7.
Wine93 Nov 20, 2023
d38bfe0
Update CHANGELOG-2.7.md
aspirer Nov 22, 2023
efcc9ce
update curve-arch.png
aspirer Nov 22, 2023
bf98143
curvefs/metaserver: fix unittest bugs
wuhongsong Nov 29, 2023
8fe05eb
fix: curvefs/metaserver ut crash when compiling with release mode
Ziy1-Tan Nov 23, 2023
bd8bbdc
curvefs: fix list xattr miss someone
SeanHai Nov 30, 2023
30db8d5
curvefs: fix trash will delete file data more than once
SeanHai Nov 30, 2023
d6c2c61
curvefs: support get mdsAddrsOverride from active mds
h0hmj Nov 9, 2023
ef409cc
curvefs/mds: add rpc SetClientMdsAddrsOverride
h0hmj Nov 10, 2023
bfb3cb9
tool-v2: add support of mds rpc SetClientMdsAddrsOverride
h0hmj Nov 13, 2023
7f9528e
curvefs: add ut for mdsaddrs override function
h0hmj Dec 8, 2023
7c49cea
get and set counts
shuaihehe Dec 7, 2023
574c337
fix trash loop and utest
SeanHai Dec 8, 2023
804beee
fix metaserver deadlock caused by bthread coroutine switching
SeanHai Dec 11, 2023
30d2397
fix curve rpc infinite retry logic to mds
SeanHai Nov 20, 2023
6e45d40
curvefs: add a new distributed transaction model to improve rename pe…
SeanHai Nov 20, 2023
4750872
Backport bvar fork fixes
wu-hanqing Dec 12, 2023
676eab3
curvefs/metaserver: fix trash bugs
wuhongsong Dec 1, 2023
7f74ddb
fix curvefs topology lock
SeanHai Dec 13, 2023
0ff3c3f
Fix side effect of Remove operation.
skypexu Nov 7, 2023
10534c2
curvefs/client: metric perf
wuhongsong Dec 20, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .obm.cfg
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
container_name: curve-build-playground.master
container_image: opencurvedocker/curve-base:build-debian11
container_image: opencurvedocker/curve-build:ubuntu22
5 changes: 5 additions & 0 deletions CHANGELOG-2.7.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# CHANGELOG of v2.7

[CHANGELOG-2.7](https://docs.opencurve.io/Release/release-notes-v2.7)

> NOTE: All release notes will be published on our documents site from now on.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
**A sandbox project hosted by the CNCF Foundation**

#### English | [简体中文](README_cn.md)
### 📄 [Documents](https://github.com/opencurve/curve/tree/master/docs) || 🌐 [Official Website](https://www.opencurve.io/Curve/HOME) || 🏠 [Forum](https://ask.opencurve.io/t/topic/7)
### 📄 [Documents](https://docs.opencurve.io/) || 🌐 [Official Website](https://www.opencurve.io/Curve/HOME) || 🏠 [Forum](https://ask.opencurve.io/t/topic/7)
<div align=left>

<div class="column" align="middle">
Expand Down
2 changes: 1 addition & 1 deletion README_cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
**CNCF基金会的沙箱托管项目**

#### [English](README.md) | 简体中文
### 📄 [文档](https://github.com/opencurve/curve/tree/master/docs) || 🌐 [官网](https://www.opencurve.io/Curve/HOME) || 🏠 [论坛](https://ask.opencurve.io/t/topic/7)
### 📄 [文档](https://docs.opencurve.io/) || 🌐 [官网](https://www.opencurve.io/Curve/HOME) || 🏠 [论坛](https://ask.opencurve.io/t/topic/7)
<div align=left>

<div class="column" align="middle">
Expand Down
5 changes: 5 additions & 0 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,11 @@ git_repository(
"//:thirdparties/brpc/brpc.patch",
"//:thirdparties/brpc/fix-gcc11.patch",
"//:thirdparties/brpc/0001-bvar-warning-on-conflict-bvar-name.patch",
"//:thirdparties/brpc/0002-Support-fork-without-exec.patch",
"//:thirdparties/brpc/0003-Add-docs-on-fork-w-o-exec.patch",
"//:thirdparties/brpc/0004-not-register-pthread_atfork-in-child-process.patch",
"//:thirdparties/brpc/0005-Fix-LatencyRecorder-qps-not-accurate.patch",
"//:thirdparties/brpc/0006-fix-1973-1863.patch",
],
patch_args = ["-p1"],
)
Expand Down
6 changes: 6 additions & 0 deletions curvefs/conf/client.conf
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,12 @@ fuseClient.getThreadPool=4
# it gurantee the consistent of file after rename, otherwise you should
# disable it for performance.
fuseClient.enableMultiMountPointRename=true

# the rename transaction models are different between version 1 and version 2
# the v2 version greatly improves the performance of rename, especially in concurrent scenarios.
# Node: v1 and v2 are incompatible and cannot be directly upgraded from a v1 cluster to v2.
fuseClient.txVersion=1

# splice will bring higher performance in some cases
# but there might be a kernel issue that will cause kernel panic when enabling it
# see https://lore.kernel.org/all/CAAmZXrsGg2xsP1CK+cbuEMumtrqdvD-NKnWzhNcvn71RV3c1yw@mail.gmail.com/
Expand Down
10 changes: 9 additions & 1 deletion curvefs/conf/metaserver.conf
Original file line number Diff line number Diff line change
Expand Up @@ -258,11 +258,17 @@ storage.rocksdb.unordered_write_buffer_size=67108864
# for store inode which exclude its s3chunkinfo list (default: 3)
storage.rocksdb.unordered_max_write_buffer_number=3
# rocksdb column family's write_buffer_size
# for store dentry and inode's s3chunkinfo list (unit: bytes, default: 128MB)
# for store dentry and inode's s3chunkinfo list (unit: bytes, default: 64MB)
storage.rocksdb.ordered_write_buffer_size=67108864
# rocksdb column family's max_write_buffer_number
# for store dentry and inode's s3chunkinfo list (default: 3)
storage.rocksdb.ordered_max_write_buffer_number=3
# rocksdb column family's write_buffer_size
# for store tx lock and write (unit: bytes, default: 64MB)
storage.rocksdb.tx_cf_write_buffer_size=67108864
# rocksdb column family's max_write_buffer_number
# for store tx lock and write (default: 3)
storage.rocksdb.tx_cf_max_write_buffer_number=3
# The target number of write history bytes to hold in memory (default: 20MB)
storage.rocksdb.max_write_buffer_size_to_maintain=20971520
# rocksdb memtable prefix bloom size ratio (size=write_buffer_size*memtable_prefix_bloom_size_ratio)
Expand All @@ -286,6 +292,8 @@ storage.rocksdb.perf_sampling_ratio=0
# we will sending its with rpc streaming instead of
# padding its into inode (default: 25000, about 25000 * 41 (byte) = 1MB)
storage.s3_meta_inside_inode.limit_size=25000
# TTL(millisecond) for tx lock
storage.tx_lock_ttl_ms=5000

# recycle options
# metaserver scan recycle period, default 1h
Expand Down
2 changes: 1 addition & 1 deletion curvefs/devops/util/tmpl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Usage:
# tmpl.sh DSV SOURCE DESTINATION
# Example:
# tmpl.sh = /usr/local/metaserver.conf /tmp/metaserver.con
# tmpl.sh = /usr/local/metaserver.conf /tmp/metaserver.conf

g_dsv=$1
g_src=$2
Expand Down
5 changes: 4 additions & 1 deletion curvefs/docker/debian11/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,10 @@ function prepare() {
}

function create_directory() {
chmod 700 "$g_prefix/data"
if [ "$g_role" != "monitor" ]; then
chmod 700 "$g_prefix/data"
fi

if [ "$g_role" == "etcd" ]; then
mkdir -p "$g_prefix/data/wal"
elif [ "$g_role" == "metaserver" ]; then
Expand Down
5 changes: 4 additions & 1 deletion curvefs/docker/openeuler/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,10 @@ function prepare() {
}

function create_directory() {
chmod 700 "$g_prefix/data"
if [ "$g_role" != "monitor" ]; then
chmod 700 "$g_prefix/data"
fi

if [ "$g_role" == "etcd" ]; then
mkdir -p "$g_prefix/data/wal"
elif [ "$g_role" == "metaserver" ]; then
Expand Down
2 changes: 1 addition & 1 deletion curvefs/proto/common.proto
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ message PartitionInfo {
// partition manage inodeid range [start, end]
required uint64 start = 5;
required uint64 end = 6;
required uint64 txId = 7;
optional uint64 txId = 7;
optional uint64 nextId = 8;
// status can change from READWRITE to READONLY, but can not chanage from READONLY to READWRITE
// READWRITE/READONLY can change to DELETING, but DELETING can not change to READWRITE/READONLY
Expand Down
23 changes: 23 additions & 0 deletions curvefs/proto/mds.proto
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ message RefreshSessionRequest {
required string fsName = 2;
required Mountpoint mountpoint = 3;
optional FsDelta fsDelta = 4;
optional string mdsAddrs = 5;
}

message RefreshSessionResponse {
Expand All @@ -202,6 +203,7 @@ message RefreshSessionResponse {
optional bool enableSumInDir = 3;
optional uint64 fsCapacity = 4;
optional uint64 fsUsedBytes = 5;
optional string mdsAddrsOverride = 6;
}

message DLockValue {
Expand Down Expand Up @@ -234,6 +236,22 @@ message CommitTxResponse {
required FSStatusCode statusCode = 1;
}

message SetClientMdsAddrsOverrideRequest {
required string clientMdsAddrsOverride = 1;
}

message SetClientMdsAddrsOverrideResponse {
required FSStatusCode statusCode = 1;
}

message TsoRequest {}

message TsoResponse {
required FSStatusCode statusCode = 1;
optional uint64 ts = 2; // transaction sequence number
optional uint64 timestamp = 3;
}

service MdsService {
// fs interface
rpc CreateFs(CreateFsRequest) returns (CreateFsResponse);
Expand All @@ -249,6 +267,11 @@ service MdsService {
rpc GetLatestTxId(GetLatestTxIdRequest) returns (GetLatestTxIdResponse);
rpc CommitTx(CommitTxRequest) returns (CommitTxResponse);

rpc Tso(TsoRequest) returns (TsoResponse);

// client lease
rpc RefreshSession(RefreshSessionRequest) returns (RefreshSessionResponse);

// client mds addrs override, for mds migration
rpc SetClientMdsAddrsOverride(SetClientMdsAddrsOverrideRequest) returns (SetClientMdsAddrsOverrideResponse);
}
109 changes: 104 additions & 5 deletions curvefs/proto/metaserver.proto
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,15 @@ enum MetaStatusCode {
RPC_STREAM_ERROR = 25;
INODE_S3_META_TOO_LARGE = 26;
STORAGE_CLOSED = 27;
// tx v2 related
TX_FAILED = 28;
TX_WRITE_CONFLICT = 29;
TX_KEY_LOCKED = 30;
TX_COMMITTED = 31;
TX_ROLLBACKED = 32;
TX_TIMEOUT = 33;
TX_INPROGRESS = 34;
TX_MISMATCH = 35;
}

// dentry interface
Expand All @@ -59,7 +68,7 @@ message GetDentryRequest {
required uint32 fsId = 4;
required uint64 parentInodeId = 5;
required string name = 6;
required uint64 txId = 7;
optional uint64 txId = 7;
optional uint64 appliedIndex = 8;
}

Expand All @@ -74,7 +83,8 @@ message Dentry {
required uint64 inodeId = 2;
required uint64 parentInodeId = 3;
required string name = 4;
required uint64 txId = 5;
// reused txId as ts in tx v2 for compatibility in metaserver
optional uint64 txId = 5;
optional uint32 flag = 6;
optional FsFileType type = 7;
optional uint64 txSequence = 8;
Expand All @@ -88,6 +98,7 @@ message GetDentryResponse {
required MetaStatusCode statusCode = 1;
optional Dentry dentry = 2;
optional uint64 appliedIndex = 3;
optional TxLock txLock = 4;
}

message ListDentryRequest {
Expand All @@ -96,7 +107,7 @@ message ListDentryRequest {
required uint32 partitionId = 3;
required uint32 fsId = 4;
required uint64 dirInodeId = 5;
required uint64 txId = 6;
optional uint64 txId = 6;
optional string last = 7; // the name of last entry
optional uint32 count = 8; // the number of entry required
optional bool onlyDir = 9;
Expand All @@ -107,6 +118,7 @@ message ListDentryResponse {
required MetaStatusCode statusCode = 1;
repeated Dentry dentrys = 2;
optional uint64 appliedIndex = 3;
optional TxLock txLock = 4;
}

message CreateDentryRequest {
Expand All @@ -120,22 +132,25 @@ message CreateDentryRequest {
message CreateDentryResponse {
required MetaStatusCode statusCode = 1;
optional uint64 appliedIndex = 2;
optional TxLock txLock = 3;
}

message DeleteDentryRequest {
required uint32 poolId = 1;
required uint32 copysetId = 2;
required uint32 partitionId = 3;
required uint32 fsId = 4;
required uint64 txId = 5;
optional uint64 txId = 5;
required uint64 parentInodeId = 6;
required string name = 7;
optional FsFileType type = 8;
optional Time create = 9;
}

message DeleteDentryResponse {
required MetaStatusCode statusCode = 1;
optional uint64 appliedIndex = 2;
optional TxLock txLock = 3;
}

message PrepareRenameTxRequest {
Expand All @@ -159,6 +174,85 @@ message PrepareRenameTxResponse {
optional uint64 appliedIndex = 2;
}

message TxLock {
required string primaryKey = 1;
required uint64 startTs = 2;
required uint64 timestamp = 3;
optional uint32 index = 4;
optional int32 ttl = 5;
}

enum TxWriteKind {
Commit = 1;
Rollback = 2;
}

message TS {
required uint64 ts = 1;
}

message TxWrite {
required uint64 startTs = 1;
required TxWriteKind kind = 2;
}

message PrewriteRenameTxRequest {
required uint32 poolId = 1;
required uint32 copysetId = 2;
required uint32 partitionId = 3;
repeated Dentry dentrys = 4;
required TxLock txLock = 5;
}

message PrewriteRenameTxResponse {
required MetaStatusCode statusCode = 1;
repeated Dentry dentrys = 2;
optional TxLock txLock = 3;
optional uint64 appliedIndex = 4;
}

message CheckTxStatusRequest {
required uint32 poolId = 1;
required uint32 copysetId = 2;
required uint32 partitionId = 3;
required string primaryKey = 4;
required uint64 startTs = 5;
required uint64 curTimestamp = 6;
}

message CheckTxStatusResponse {
required MetaStatusCode statusCode = 1;
optional uint64 appliedIndex = 2;
}

message ResolveTxLockRequest {
required uint32 poolId = 1;
required uint32 copysetId = 2;
required uint32 partitionId = 3;
required Dentry dentry = 4;
required uint64 startTs = 5;
required uint64 commitTs = 6;
}

message ResolveTxLockResponse {
required MetaStatusCode statusCode = 1;
optional uint64 appliedIndex = 2;
}

message CommitTxRequest {
required uint32 poolId = 1;
required uint32 copysetId = 2;
required uint32 partitionId = 3;
repeated Dentry dentrys = 4;
required uint64 startTs = 5;
required uint64 commitTs = 6;
}

message CommitTxResponse {
required MetaStatusCode statusCode = 1;
optional uint64 appliedIndex = 2;
}

// inode interface
message GetInodeRequest {
required uint32 poolId = 1;
Expand Down Expand Up @@ -266,7 +360,7 @@ message Inode {
optional uint64 rdev = 16;
// field 17 is left for compatibility
map<uint64, S3ChunkInfoList> s3ChunkInfoMap = 18; // TYPE_S3 only, first is chunk index
optional uint32 dtime = 19;
optional uint64 dtime = 19;
optional uint32 openmpcount = 20; // openmpcount mount points had the file open
map<string, bytes> xattr = 21;
repeated uint64 parent = 22;
Expand Down Expand Up @@ -538,6 +632,11 @@ service MetaServerService {
rpc CreateDentry(CreateDentryRequest) returns (CreateDentryResponse);
rpc DeleteDentry(DeleteDentryRequest) returns (DeleteDentryResponse);
rpc PrepareRenameTx(PrepareRenameTxRequest) returns (PrepareRenameTxResponse);
// tx v2
rpc PrewriteRenameTx(PrewriteRenameTxRequest) returns (PrewriteRenameTxResponse);
rpc CheckTxStatus(CheckTxStatusRequest) returns (CheckTxStatusResponse);
rpc ResolveTxLock(ResolveTxLockRequest) returns (ResolveTxLockResponse);
rpc CommitTx(CommitTxRequest) returns (CommitTxResponse);

// inode interface
rpc GetInode(GetInodeRequest) returns (GetInodeResponse);
Expand Down
1 change: 0 additions & 1 deletion curvefs/proto/topology.proto
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ message ClusterInfoData {
required string clusterId = 1;
// <fsId, partitionIndex of this fs>
map<uint32, uint32> partitionIndexs = 2;

}

message PoolData {
Expand Down
6 changes: 3 additions & 3 deletions curvefs/sdk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ How to build

``` bash
$ git clone [email protected]:opencurve/curve.git
$ cd curve
$ make dep stor=fs
$ make playground
$ make ci-dep stor=fs
$ make sdk
```

It will generate a jar after build success:
It will generate a jar package after build success:

```
Build SDK success => /curve/curvefs/sdk/output/curvefs-hadoop-1.0-SNAPSHOT.jar
Expand Down
Loading