exceeding tag character limit when uploading many items
Closed this issue · 2 comments
Server Software
(You can get all these stats from http://<your site>/system_info
)
- Shimmie version:
shimmie: "2.11.0-alpha-20240221-535a6f3"
schema: 21
php: "8.2.7"
db: "pgsql PostgreSQL 15.6 on x86_64-pc-linux-musl, compiled by gcc (Alpine 13.2.1_git20231014) 13.2.1 20231014, 64-bit"
os: "Linux 633191f9d84d 5.10.0-26-amd64 1 SMP Debian 5.10.197-1 (2023-09-29) x86_64"
server: "Unit/1.31.1"
Tried to upload around 80 images, using a single short common tag like "asdf" and no individual tags.
Images get uploaded and the tag is applied and searchable, but the following error banner is displayed:
The tag below is longer than 255 characters, please use a shorter tag.
id=678,677,676,675,674,673,672,671,670,669,668,667,666,665,664,663,662,661,660,659,658,657,656,655,654,653,652,651,650,649,648,647,646,645,644,643,642,641,640,639,638,637,636,635,634,633,632,631,630,629,628,627,626,625,624,623,622,621,620,619,618,617,616,615,614,613,612,611,610,609,608,607,606,605,604,603,602,601,600,599
I see this results from a check implemented in b1d634a - are we running in a hard limit which is needed to avoid SQL errors?
What I don't understand right now is how the number of posts affects the length of the tag string which is stored in the db - are the IDs belonging to a tag stored in the same string as the tag name?
That looks like an unintended combination of things -- the tag parser makes sure tags are less than 255 characters, because that's the longest tag that databases can store; but it doesn't account for the fact that you might want to search for a tag longer than 255 characters 🤔
all good now - you're awesome, ty