"SqliteFailure" with a remote replica

未关闭
#2,110 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 11 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
30/100
Issue 类型
缺陷
描述清晰度
需要澄清
活跃度
停滞
技术栈
rust, sqlite

调研方向

首先在远程副本模式下使用 libsql 0.9.3 重现插入失败,然后在启用 RUST_BACKTRACE=1 的情况下,将其与本地副本、仅本地和远程模式进行比较。检查 db.rs 中第 539 行和第 343 行附近报告的位置,并确定产生 malformed schema 错误的条件。确认失败原因并验证修复方案,或明确重现边界,即表示完成。

由索引模型根据 Issue 内容生成。

描述

Hi! I've been using libsql for my project, and lately I've been having this problem:

thread 'actix-server worker 2' panicked at /var/home/sergio/Documentos/staticcms/rusty/src/db.rs:539:40:
: SqliteFailure(11, "malformed database schema (?)")
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

I've tried other modes to see if I could harvest more info:

In local replica mode:

thread 'actix-server worker 2' panicked at /var/home/sergio/Documentos/staticcms/rusty/src/db.rs:343:22:
Compilation of SQL sentence failed: Misuse("Cannot describe in local replica mode.")

(Honestly, this might be something I'm doing wrong, but could be of interest).

In local only:
It works fine, but I get:
2025-06-26T20:28:26.488910Z ERROR libsql::local::connection: Failed to clear authorizer during disconnect

In remote:
It also works fine.

Some details:

  • I'm using 0.9.3, I can't use anything newer due to the bug that requires a multithreaded runtime, however I can't use it.
  • Reading works fine, and even removing, seems like this error is cause by an insert (haven't tried modifications).
主要语言
C
星标
17.3k
派生
562
平均合并
10 天 15 小时
30 天内合并 PR
1

环境准备

  • 提供 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

tursodatabase/libsql 的其他 Issue

查看 tursodatabase/libsql 的全部 Issue

相似的 Issue

更多 C Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。