Skip to content

Commit

Permalink
fix/chunkserver: memory slow leak
Browse files Browse the repository at this point in the history
  • Loading branch information
ilixiaocui authored and opencurveadmin committed Feb 26, 2024
1 parent 5ca41a8 commit 55143c1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/chunkserver/copyset_node.h
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,9 @@ class CopysetNode : public braft::StateMachine,
::braft::Closure *done);

void ShipToSync(ChunkID chunkId) {
if (enableOdsyncWhenOpenChunkFile_) {
return;
}
curve::common::LockGuard lg(chunkIdsLock_);
chunkIdsToSync_.push_back(chunkId);
}
Expand Down
2 changes: 2 additions & 0 deletions src/chunkserver/raftlog/curve_segment.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,8 @@ int CurveSegment::load(braft::ConfigurationManager* configuration_manager) {

if (_is_open) {
_last_index = actual_last_index;
} else {
_offset_and_term.shrink_to_fit();
}

// seek to end, for opening segment
Expand Down

0 comments on commit 55143c1

Please sign in to comment.