Skip to content

Commit

Permalink
Disagg: Add nullptr check on S3LockLocalManager (#9387)
Browse files Browse the repository at this point in the history
ref #8673, ref #9394

Signed-off-by: Calvin Neo <[email protected]>

Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
  • Loading branch information
CalvinNeo and ti-chi-bot[bot] authored Sep 2, 2024
1 parent 738aade commit 0761d45
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions dbms/src/Flash/Disaggregated/S3LockClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ String S3LockClient::updateOwnerAddr(const Timepoint & deadline, const LoggerPtr
using namespace std::chrono_literals;
while (true)
{
RUNTIME_CHECK(s3gc_owner != nullptr);
auto owner_info = s3gc_owner->getOwnerID();
switch (owner_info.status)
{
Expand Down
6 changes: 6 additions & 0 deletions dbms/src/Storages/Page/V3/Universal/S3LockLocalManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,11 @@ std::optional<CheckpointProto::ManifestFilePrefix> S3LockLocalManager::initStore
}

s3lock_client = std::move(s3lock_client_);
if unlikely (s3lock_client == nullptr)
{
LOG_INFO(log, "S3 lock manager has null s3lock client");
}

store_id = actual_store_id;

LOG_INFO(
Expand Down Expand Up @@ -223,6 +228,7 @@ String S3LockLocalManager::createS3Lock(
}
else
{
RUNTIME_CHECK_MSG(s3lock_client, "S3 Lock Client is not initialized");
// Try to create a lock file for the data file created by another store.
// e.g. Ingest some pages from CheckpointDataFile or DTFile when doing FAP,
// send rpc to S3LockService
Expand Down

0 comments on commit 0761d45

Please sign in to comment.