【问题标题】:Apache Geode Native Client Cache::createRegion: region exists in local cacheApache Geode Native Client Cache::createRegion: 区域存在于本地缓存中
【发布时间】:2021-10-01 16:58:22
【问题描述】:

回答this question 我正在使用Pivotal Native Client 创建许多local client caches,因此每个本地客户端缓存都有自己的Listener。我遇到了一个问题,即无论使用哪种RegionShortcut,例如.LOCAL 或其他任何.LOCAL,都默认创建缓存、池和区域工厂后的from the QuickStart example

RegionFactory rf = c.CreateRegionFactory(RegionShortcut.LOCAL);

然后:

IRegion<string, string> region = rf.SetPoolName(poolName).Create<string, string>("exampleRegion");

对于客户端缓存的第一个实例来说很好,但是一旦尝试将任何其他实例作为另一个本地客户端缓存,那么上面的代码就会给出错误:

An unhandled exception of type 'Apache.Geode.Client.RegionExistsException' occurred in Pivotal.Gemfire.dll

Additional information: Cache::createRegion: "exampleRegion" region exists in local cache

那么如何在同一个 C# 项目中创建多个本地客户端缓存?

【问题讨论】:

  • 这看起来像一个错误。建议上报到用户的Geode列表
  • @WesWilliams thx 4 条评论。应这样做。虽然我猜新的缓存 cd 是由每个缓存的新线程而不是新的对象实例完成的……但是对于高频应用程序来说,会有更多的上下文切换。 Wd 更喜欢 Geode 来管理上下文切换?
  • 在“区域存在”错误的另一种情况下,我之前将区域初始化为 <string, string> 并尝试以 <string, object> 连接

标签: gemfire geode


【解决方案1】:

当使用区域工厂并尝试订阅区域中的键时,这种情况再次发生,这是在缓存和区域初始化的单独(后台)线程上完成的。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-03-11
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多