Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -314,8 +314,11 @@ public void cleanExpiredLocks() {
// Remove outdated failures
info.removeOldFailures(cutoffTime);
if (info.getFailureCount() == 0) {
String[] parts = entry.getKey().split("@");
LOGGER.info(DataNodeMiscMessages.IP_UNLOCKED_EXPIRED, parts[1], parts[0]);
final String[] parts = entry.getKey().split("@", 2);
LOGGER.info(
DataNodeMiscMessages.IP_UNLOCKED_EXPIRED,
parts.length == 2 ? parts[1] : "",
parts.length >= 1 ? parts[0] : "");
return true;
}
return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
import org.apache.iotdb.rpc.TSStatusCode;
import org.apache.iotdb.service.rpc.thrift.TSConnectionInfo;
import org.apache.iotdb.service.rpc.thrift.TSConnectionInfoResp;
import org.apache.iotdb.service.rpc.thrift.TSConnectionType;
import org.apache.iotdb.service.rpc.thrift.TSProtocolVersion;

import org.apache.tsfile.external.commons.lang3.StringUtils;
Expand Down Expand Up @@ -138,7 +139,10 @@ public BasicOpenSessionResp login(

final long userId = AuthorityChecker.getUserId(username).orElse(-1L);

boolean enableLoginLock = userId != -1;
// Pipe/CQ/Select-Into use InternalClientSession for password validation and should not
// participate in user@ip login lock (empty client address shares one lock bucket).
final boolean enableLoginLock =
userId != -1 && session.getConnectionType() != TSConnectionType.INTERNAL;
LoginLockManager loginLockManager = LoginLockManager.getInstance();
if (enableLoginLock && loginLockManager.checkLock(userId, session.getClientAddress())) {
// Generic authentication error
Expand Down
Loading