【问题标题】:Getting AlreadyExistsException when creating table, even table is not found in aws keyspace创建表时出现AlreadyExistsException,甚至在aws键空间中找不到表
【发布时间】:2021-12-02 08:49:42
【问题描述】:

我正在尝试通过对 aws 键空间的以下查询来创建表。它抛出一个异常“com.datastax.oss.driver.api.core.servererrors.AlreadyExistsException: Object raise_dev.ascend_r_c_zzzj already exists”,甚至在键空间中找不到表。

CREATE TABLE ascend_dev.ascend_r_c_zzzg(id uuid PRIMARY KEY, seqno text  ,wtdrd text  ,drdrstz text  ,drexmer text  ,drabf text  ,drdint text  ,drday text  ,drlang text  ,drmnrsp text  ,drhelpd text  )  WITH bloom_filter_fp_chance = 0.01
   AND caching = {'keys': 'ALL', 'rows_per_partition': 'NONE'}
   AND comment = ''
   AND crc_check_chance = 1.0
   AND default_time_to_live = 0
   AND gc_grace_seconds = 864000
   AND max_index_interval = 2048
   AND memtable_flush_period_in_ms = 0
   AND min_index_interval = 128
   AND read_repair_chance = 0.0
   AND speculative_retry = '99PERCENTILE';

【问题讨论】:

    标签: java amazon-web-services spring-boot amazon-keyspaces


    【解决方案1】:

    AWS Keyspaces 中的 DDL 操作是异步的。这样做可能需要一些时间。您可以在非常罕见的时间范围内创建表但尚未准备好使用(例如某些资源的 terraform 操作)。

    最好的方法是如果不存在则创建,并使用重试/轮询来检查它何时可用。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-07-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-04-08
      • 1970-01-01
      • 1970-01-01
      • 2022-06-16
      相关资源
      最近更新 更多