Skip to content

Commit

Permalink
curvefs/mds: fix miss set txid when create partition and inodeid type
Browse files Browse the repository at this point in the history
  • Loading branch information
SeanHai committed May 24, 2022
1 parent 209cd94 commit 9d89d28
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
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

0 comments on commit 9d89d28

Please sign in to comment.