MCPcopy Create free account
hub / github.com/Tencent/Tendis / updateFakeClient

Method updateFakeClient

src/tendisplus/script/lua_state.cpp:1208–1221  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1206}
1207
1208void LuaState::updateFakeClient() {
1209 if (_fakeSess == nullptr) {
1210 _fakeSess = std::make_unique<LocalSessionGuard>(_svr.get());
1211 _fakeSess->getSession()->setInLua(true);
1212 }
1213 if (!_fakeSess->getSession()->getCtx()->authed() &&
1214 _sess->getCtx()->authed()) {
1215 _fakeSess->getSession()->getCtx()->setAuthed();
1216 }
1217 if (_fakeSess->getSession()->getCtx()->getDbId() !=
1218 _sess->getCtx()->getDbId()) {
1219 _fakeSess->getSession()->getCtx()->setDbId(_sess->getCtx()->getDbId());
1220 }
1221}
1222
1223} // namespace tendisplus

Callers 1

Calls 8

setInLuaMethod · 0.80
authedMethod · 0.80
getCtxMethod · 0.80
setAuthedMethod · 0.80
setDbIdMethod · 0.80
getMethod · 0.45
getSessionMethod · 0.45
getDbIdMethod · 0.45

Tested by

no test coverage detected