infiniflow / infinity

The AI-native database built for LLM applications, providing incredibly fast hybrid search of dense vector, sparse vector, tensor (multi-vector), and full-text
https://infiniflow.org
Apache License 2.0
2.68k stars 275 forks source link

[Bug]: Although an error occurred when switching from standalone to leader mode, the mode has already been switched to admin mode. #2207

Closed wxzkenny closed 1 week ago

wxzkenny commented 2 weeks ago

Is there an existing issue for the same bug?

Version or Commit ID

bcde5251945c88670a5f09c98c1c10d11e05affc

Other environment information

Hardware: X86_64
OS type: 
 $ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 22.04.4 LTS
Release:        22.04
Codename:       jammy
 $ uname -a
Core Info: Linux ibp 5.15.0-122-generic #132-Ubuntu SMP Thu Aug 29 13:45:52 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux

infinity version:
Release: 0.5.0 build on 2024-11-05 13:21.45 with RelWithDebInfo mode from branch: main, commit-id: bcde5251945c88670a5f09c98c1c10d11e05affc

Actual behavior and How to reproduce it

  1. Start a database instance. infinity -f follower.toml
  2. Executes the following command: $ psql -h 0.0.0.0 -p 5001
    ADMIN SHOW NODE;
    ADMIN SET STANDALONE;
    ADMIN SHOW NODE;
    ADMIN SET LEADER USING 'leader';
    ADMIN SHOW NODE;

Screenshot of the error: image

Expected behavior

In case of failure, the database state should not be modified, otherwise, consecutive executions will succeed.

Additional information

No response

JinHai-CN commented 1 week ago

Tested successfully in the version of 0.5.0-dev2.