Skip to content

ISSUE_INDEXER_QUEUE_CONN_STR used as ISSUE_INDEXER_QUEUE_DIR #14272

Closed
@nuno-silva

Description

@nuno-silva
  • Gitea version (or commit ref): 1.13.1 (and also master as of 8688c2b)
  • Git version: NA
  • Operating system: docker
  • Database (use [x]): NA
  • Can you reproduce the bug at https://try.gitea.io: NA
  • Log gist: NA

Description

It seems ISSUE_INDEXER_QUEUE_CONN_STR is being used as ISSUE_INDEXER_QUEUE_DIR.
Steps to reproduce (from source):

  • set this in app.ini (and some sane values for the other ini sections):
[indexer]
ISSUE_INDEXER_TYPE = bleve
ISSUE_INDEXER_PATH = /data/gitea/indexers/issues.bleve
  • start gitea web (this one was compiled from source as of 8688c2b):
/data $ GITEA_WORK_DIR=/data/gitea ~/Downloads/gitea/gitea web --config /data/gitea/conf/app.ini
  • Notice issues.queue is created, as per the defaults:
/data $ tree gitea/indexers/
gitea/indexers/
├── issues.bleve
│   ├── index_meta.json
│   ├── rupture_meta.json
│   └── store
└── issues.queue
    ├── 000002.ldb
    ├── 000003.log
    ├── CURRENT
    ├── CURRENT.bak
    ├── LOCK
    ├── LOG
    └── MANIFEST-000004
  • stop gitea
  • rm -r /data/gitea/indexers/
  • change the indexer config section to
[indexer]
ISSUE_INDEXER_TYPE = bleve
ISSUE_INDEXER_PATH = /data/gitea/indexers/issues.bleve
ISSUE_INDEXER_QUEUE_CONN_STR = "addrs=127.0.0.1:6379 db=0"
  • start gitea web again

  • notice that issues.queue does not exist, but a 'addrs=127.0.0.1:6379 db=0' dir was created:

/data $ tree gitea/indexers/
gitea/indexers/
└── issues.bleve
    ├── index_meta.json
    ├── rupture_meta.json
    └── store

1 directory, 3 files
/data $ ls
'addrs=127.0.0.1:6379 db=0'   git   gitea
/data $ ls addrs\=127.0.0.1\:6379\ db\=0/
000001.log  CURRENT  LOCK  LOG  MANIFEST-000000

Notice I did not set ISSUE_INDEXER_QUEUE_TYPE nor ISSUE_INDEXER_QUEUE_DIR anywhere.


The config-cheat-sheet does mention that ISSUE_INDEXER_QUEUE_TYPE and ISSUE_INDEXER_QUEUE_DIR are deprecated, but they are present in the example config file:

ISSUE_INDEXER_QUEUE_TYPE = levelqueue
; When ISSUE_INDEXER_QUEUE_TYPE is levelqueue, this will be the queue will be saved path,
; default is indexers/issues.queue
ISSUE_INDEXER_QUEUE_DIR = indexers/issues.queue
; When `ISSUE_INDEXER_QUEUE_TYPE` is `redis`, this will store the redis connection string.
ISSUE_INDEXER_QUEUE_CONN_STR = "addrs=127.0.0.1:6379 db=0"
; Batch queue number, default is 20
ISSUE_INDEXER_QUEUE_BATCH_NUMBER = 20


I was able to reproduce this using:

  • gitea 1.13.1, docker, sqlite
  • gitea 1.13.1, Gentoo, MySQL (production install)
  • master as of 8688c2b), Ubuntu 18, sqlite

Screenshots

NA

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/docsThis PR mainly updates/creates documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions