dotnetcore / dotnetcore/sharding-core

关于 "cache model timeout" 错误的详细解释和文档补充请求

Open
#299 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
1.3k
Forks
183
Avg merge
7h 43m
Merged PRs (30d)
1

Description

在以下[代码位置](https://github.com/dotnetcore/sharding-core/blob/e87f9ffe6738853fd869ca5d36a20278e268317c/src/ShardingCore/EFCores/EFCore7_8_9x/ShardingModelSource.cs#L84):
```csharp
var acquire = Monitor.TryEnter(cacheLockObject, TimeSpan.FromSeconds(waitSeconds));
if (!acquire)
{
//如果排查后非循环注入等操作导致的确实是并发一瞬间导致的timeout比如上千上万个分片后缀那么可以将模型level设置高并且cacheEntrySize设置为1超时时间设置大一点即可
//如果是abp那么请确认是否使用了AsyncExecutor
//https://github.com/dotnetcore/sharding-core/issues/221
throw new ShardingCoreInvalidOperationException("cache model timeout");
}
```

注释中提到"**如果是abp那么请确认是否使用了AsyncExecutor**",但没有详细解释,官方文档似乎也没有提及。

有几个疑问:
1. `AsyncExecutor` 具体指的是什么?是某个具体类吗?
2. 为什么在 ABP环境 下需要特别关注 `AsyncExecutor`? 如何使用`AsyncExecutor` 避免上述异常?

@xuejmnet

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.