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

curvefs/mds: fix miss set txid when create partition and fix inodeId type #1479

Merged
merged 1 commit into from
May 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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 curvefs/src/client/rpcclient/metacache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@ bool MetaCache::SelectPartition(CopysetTarget *target) {
return true;
}

bool MetaCache::GetCopysetIDwithInodeID(uint32_t inodeID,
bool MetaCache::GetCopysetIDwithInodeID(uint64_t inodeID,
CopysetGroupID *groupID,
PartitionID *partitionID,
uint64_t *txId) {
Expand Down
2 changes: 1 addition & 1 deletion curvefs/src/client/rpcclient/metacache.h
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ class MetaCache {
bool SelectPartition(CopysetTarget *target);

// get info from partitionMap or copysetMap
bool GetCopysetIDwithInodeID(uint32_t inodeID, CopysetGroupID *groupID,
bool GetCopysetIDwithInodeID(uint64_t inodeID, CopysetGroupID *groupID,
PartitionID *patitionID, uint64_t *txId);

bool GetCopysetInfowithCopySetID(const CopysetGroupID &groupID,
Expand Down
2 changes: 1 addition & 1 deletion curvefs/src/client/rpcclient/task_excutor.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class TaskContext {

TaskContext() = default;
TaskContext(MetaServerOpType type, RpcFunc func, uint32_t fsid = 0,
uint32_t inodeid = 0, bool streaming = false)
uint64_t inodeid = 0, bool streaming = false)
: optype(type), rpctask(func), fsID(fsid), inodeID(inodeid),
streaming(streaming) {}

Expand Down
3 changes: 2 additions & 1 deletion curvefs/src/mds/topology/topology_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,8 @@ void TopologyManager::CreatePartitions(const CreatePartitionRequest *request,
info->set_partitionid(partitionId);
info->set_start(idStart);
info->set_end(idEnd);
info->set_status(PartitionStatus::READONLY);
info->set_txid(0);
info->set_status(PartitionStatus::READWRITE);
} else {
// TODO(wanghai): delete partition on metaserver
LOG(ERROR) << "Add partition failed after create partition."
Expand Down