这是indexloc提供的服务,不要输入任何密码
Skip to content

bug: update_many feature can prevent startup on table name conflict #8844

@BenoitRanque

Description

@BenoitRanque

Version Information

Server Version: 2.10.0

Environment

Cloud/OSS

What is the current behaviour?

v2.10.0 introduces the ability to update multiple records in a single operation with the update_TABLE_many mutation.

This can cause naming type conflicts if a TABLE_updates table already exists.

Alarmingly, this seems to prevent server start on cloud, rendering the project inaccessible until downgraded.

Error message:

{ "code": "unexpected", "error": "Found conflicting definitions for 'TABLE_updates'. The definition at mutation_root.update_TABLE_many.updates differs from the the definitions [mutation_root.insert_TABLE_updates_one, mutation_root.insert_TABLE_updates.returning, query_root.TABLE_updates_by_pk, query_root.TABLE_updates].", "path": "$" }

What is the expected behaviour?

This should be listed as a breaking change and should not prevent server start.

How to reproduce the issue?

  1. create and track the following tables in a 2.8.0 project
CREATE TABLE asset (id INT PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY);
CREATE TABLE asset_updates (id INT PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY);
  1. update the project to 2.10
  2. server refuses to start

Any possible solutions?

This can be worked around by renaming the offending tables, or using the table customization to effectively rename the type associated with a table.

Product Eng team checkpoints:

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions