Skip to content

Commit a06a84d

Browse files
committed
Minor fix while debug
1 parent d10f5ba commit a06a84d

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

src/main/cpp/base/UniqueIdGenerator.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
ROCKETMQ_NAMESPACE_BEGIN
1010

11-
const uint8_t UniqueIdGenerator::VERSION = 0;
11+
const uint8_t UniqueIdGenerator::VERSION = 1;
1212

1313
UniqueIdGenerator::UniqueIdGenerator()
1414
: prefix_(), since_custom_epoch_(std::chrono::system_clock::now() - customEpoch()),

src/main/cpp/rocketmq/CredentialsProvider.cpp

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1+
#include "GHttpClient.h"
12
#include "MixAll.h"
23
#include "StsCredentialsProviderImpl.h"
34
#include "absl/memory/memory.h"
45
#include "absl/strings/match.h"
6+
#include "fmt/format.h"
57
#include "ghc/filesystem.hpp"
68
#include "google/protobuf/struct.pb.h"
79
#include "google/protobuf/util/json_util.h"
810
#include "rocketmq/Logger.h"
911
#include "spdlog/spdlog.h"
10-
#include "GHttpClient.h"
1112
#include <cstdlib>
1213
#include <fstream>
1314
#include <iostream>
1415
#include <string>
15-
#include "fmt/format.h"
1616

1717
ROCKETMQ_NAMESPACE_BEGIN
1818

@@ -78,6 +78,7 @@ ConfigFileCredentialsProvider::ConfigFileCredentialsProvider() {
7878
if (fields.contains(ACCESS_SECRET_FIELD_NAME)) {
7979
access_secret_ = fields.at(ACCESS_SECRET_FIELD_NAME).string_value();
8080
}
81+
SPDLOG_DEBUG("Credentials for access_key={} loaded", access_key_);
8182
} else {
8283
SPDLOG_WARN("Failed to parse credential JSON config file. Message: {}", status.message().data());
8384
}
@@ -103,9 +104,7 @@ StsCredentialsProviderImpl::StsCredentialsProviderImpl(std::string ram_role_name
103104
http_client_->start();
104105
}
105106

106-
StsCredentialsProviderImpl::~StsCredentialsProviderImpl() {
107-
http_client_->shutdown();
108-
}
107+
StsCredentialsProviderImpl::~StsCredentialsProviderImpl() { http_client_->shutdown(); }
109108

110109
Credentials StsCredentialsProviderImpl::getCredentials() {
111110
if (std::chrono::system_clock::now() >= expiration_) {
@@ -182,5 +181,4 @@ const char* StsCredentialsProviderImpl::FIELD_SESSION_TOKEN = "SecurityToken";
182181
const char* StsCredentialsProviderImpl::FIELD_EXPIRATION = "Expiration";
183182
const char* StsCredentialsProviderImpl::EXPIRATION_DATE_TIME_FORMAT = "%Y-%m-%d%ET%H:%H:%S%Ez";
184183

185-
186184
ROCKETMQ_NAMESPACE_END

0 commit comments

Comments
 (0)