Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ReplyError: ERR The ID specified in XADD is equal or smaller than the target stream top item #10482

Closed
tamaina opened this issue Apr 5, 2023 · 6 comments
Assignees
Labels
🐛Bug Unexpected behavior packages/backend Server side specific issue/PR

Comments

@tamaina
Copy link
Contributor

tamaina commented Apr 5, 2023

ReplyError: ERR The ID specified in XADD is equal or smaller than the target stream top item
    at parseError (/home/misskey/misskey/node_modules/.pnpm/[email protected]/node_modules/redis-parser/lib/parser.js:179:12)
    at parseType (/home/misskey/misskey/node_modules/.pnpm/[email protected]/node_modules/redis-parser/lib/parser.js:302:14) {
  command: {
    name: 'xadd',
    args: [
      'p1.a9z.dev:antennaTimeline:98vnb5j45s',
      'MAXLEN',
      '~',
      '200',
      '1680699939456-*',
      'note',
      '9d79nudcbb'
    ]
  }
@tamaina tamaina added the ⚠️bug? This might be a bug label Apr 5, 2023
@syuilo
Copy link
Member

syuilo commented Apr 10, 2023

@syuilo syuilo added 🐛Bug Unexpected behavior packages/backend Server side specific issue/PR and removed ⚠️bug? This might be a bug labels Apr 10, 2023
@syuilo
Copy link
Member

syuilo commented Apr 10, 2023

新しく追加するエントリは既存の最も新しいエントリの持つIDより新しいIDでなければならないけど、何らかの理由で既に追加しようとしたものより新しいIDを持つものが追加されているから怒られている?

@syuilo
Copy link
Member

syuilo commented Apr 10, 2023

Misskeyの処理上タイミングによってはちょっと古いノートが追加されることもありうるだろうし、「新しく追加するエントリは既存の最も新しいエントリの持つIDより新しいIDでなければならない」っていう縛りはちょっときついわね

@syuilo
Copy link
Member

syuilo commented Apr 10, 2023

やっぱりそうっぽい

When a user specified an explicit ID to XADD, the minimum valid ID is 0-1, and the user must specify an ID which is greater than any other ID currently inside the stream, otherwise the command will fail and return an error.

https://redis.io/commands/xadd/

@syuilo
Copy link
Member

syuilo commented Apr 10, 2023

ID生成をRedisに任せるしかなさそうだけど、そうした場合ページングどうしようかしら

@syuilo
Copy link
Member

syuilo commented Apr 10, 2023

あー現状も結局は時間での比較だから問題ないかも

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛Bug Unexpected behavior packages/backend Server side specific issue/PR
Projects
None yet
Development

No branches or pull requests

2 participants