Skip to content

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

@kevindaizj

Description

@kevindaizj

在以下代码位置

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions