perf[orm]: find thread by threadExecutorMap

This commit is contained in:
jaysunxiao committed 2024-09-23 19:34:48 +08:00
1 parent 6dd5b3ac65
commit 082c2fa581
6 files changed
+37 -31

No files matched your search

+2 -2
View File
@@ -24,8 +24,8 @@ import java.util.function.BiConsumer;
public interface IEntityCache<PK extends Comparable<PK>, E extends IEntity<PK>> {
/**
* EN: Load data from the database to the cache and return a default value with an empty ID if the database does not exist.
* CN: 从数据库中加载数据到缓存,如果数据库不存在则返回一个id为空的默认值。
* EN: Load data from the database to the cache and return null if the database does not exist.
* CN: 从数据库中加载数据到缓存,如果数据库不存在则返回null。
*/
@Nullable
E load(PK pk);
@@ -63,7 +63,7 @@ public abstract class MongoIdUtils {
return document.getLong("count") + 1;
}
} catch (Throwable t) {
logger.info("getIncrementIdFromMongo collection:[{}] document:[{}] default error", collectionName, documentName, t);
logger.error("getIncrementIdFromMongo collection:[{}] document:[{}] default error", collectionName, documentName, t);
}
var query = Filters.eq("_id", documentName);
@@ -75,7 +75,7 @@ public abstract class MongoIdUtils {
var document = collection.findOneAndUpdate(query, Updates.combine(inc, setOnInsert), new FindOneAndUpdateOptions().upsert(true));
return null == document ? INIT_ID : document.getLong(COUNT) + 1;
} catch (Throwable t) {
logger.info("getIncrementIdFromMongo collection:[{}] document:[{}] retry error! ", collectionName, documentName, t);
logger.error("getIncrementIdFromMongo collection:[{}] document:[{}] retry error! ", collectionName, documentName, t);
}
}