{"record":{"id":"e81990adc12ee3eb","repo":"alibaba/nacos","slug":"expire-error","errorCode":null,"errorMessage":"expire error.","messagePattern":"expire error\\.","errorType":"exception","errorClass":"NacosLockException","httpStatus":null,"severity":"error","filePath":"lock/src/main/java/com/alibaba/nacos/lock/service/impl/LockOperationServiceImpl.java","lineNumber":533,"sourceCode":"        LockInfo lockInfo = new LockInfo();\n        lockInfo.setKey(new LockKey(lockInstance.getLockType(), lockInstance.getKey()));\n        lockInfo.setOwner(lockInstance.getOwner());\n        request.setLockInfo(lockInfo);\n        WriteRequest writeRequest = WriteRequest.newBuilder().setGroup(group())\n            .setData(ByteString.copyFrom(serializer.serialize(request)))\n            .setOperation(LockOperationEnum.EXPIRE.name()).build();\n        try {\n            Response response = protocol.write(writeRequest);\n            if (response.getSuccess()) {\n                return serializer.deserialize(response.getData().toByteArray());\n            }\n            throw new NacosLockException(response.getErrMsg());\n        } catch (NacosLockException e) {\n            LOGGER.error(\"key: {}, lockType:{} expire fail, errorMsg: {}\", lockInstance.getKey(),\n                lockInstance.getLockType(), e.getMessage());\n            throw e;\n        } catch (Exception e) {\n            throw new NacosLockException(\"expire error.\", e);\n        }\n    }\n    \n    private void notifyFirstWaiter(LockKey lockKey, AbstractAtomicLock atomicLock) {\n        WaitEntry entry = atomicLock.peekFirstWaiter();\n        if (entry == null) {\n            return;\n        }\n        String targetConnectionId = entry.getConnectionId();\n        LockNotificationRequest notification = LockNotificationRequest.available(\n            lockKey.getKey(), lockKey.getLockType(), entry.getOwner());\n        notificationExecutor.submit(() -> {\n            try {\n                rpcPushService.pushWithoutAck(targetConnectionId, notification);\n            } catch (Exception e) {\n                LOGGER.warn(\"Lock: failed to notify waiter, key={}, connectionId={}\",\n                    lockKey, targetConnectionId, e);\n            }","sourceCodeStart":515,"sourceCodeEnd":551,"githubUrl":"https://github.com/alibaba/nacos/blob/9b989acdf181d00898f2e8839257bb2b2a3cefe3/lock/src/main/java/com/alibaba/nacos/lock/service/impl/LockOperationServiceImpl.java#L515-L551","documentation":"Error \"expire error.\" thrown in alibaba/nacos.","triggerScenarios":"Thrown at lock/src/main/java/com/alibaba/nacos/lock/service/impl/LockOperationServiceImpl.java:533 when the library encounters an invalid state.","commonSituations":"Expiring a lock failed on the server.","solutions":["Inspect the server logs for the underlying cause, fix it, and retry the operation."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"9b989acdf181d00898f2e8839257bb2b2a3cefe3","analyzedAt":"2026-08-14T07:17:31.569Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}