Page MenuHomePhabricator

/v2/suggest/sections/{title}/{from}/{to}: Error in your SQL syntax; check for the right syntax to use near ')
Closed, ResolvedPublic2 Estimated Story PointsPRODUCTION ERROR

Description

Error
message
	ER_PARSE_ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ')
				ORDER BY source_title, frequency DESC' at line 5
trace
Error: ER_PARSE_ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ')
				ORDER BY source_title, frequency DESC' at line 5
    at Sequence._packetToError (/srv/service/node_modules/mysql/lib/protocol/sequences/Sequence.js:47:14)
    at Query.ErrorPacket (/srv/service/node_modules/mysql/lib/protocol/sequences/Query.js:79:18)
    at Protocol._parsePacket (/srv/service/node_modules/mysql/lib/protocol/Protocol.js:291:23)
    at Parser._parsePacket (/srv/service/node_modules/mysql/lib/protocol/Parser.js:433:10)
    at Parser.write (/srv/service/node_modules/mysql/lib/protocol/Parser.js:43:10)
    at Protocol.write (/srv/service/node_modules/mysql/lib/protocol/Protocol.js:38:16)
    at Socket.<anonymous> (/srv/service/node_modules/mysql/lib/Connection.js:88:28)
    at Socket.<anonymous> (/srv/service/node_modules/mysql/lib/Connection.js:526:10)
    at Socket.emit (node:events:514:28)
    at addChunk (node:internal/streams/readable:343:12)
    at readableAddChunk (node:internal/streams/readable:316:9)
    at Readable.push (node:internal/streams/readable:253:10)
    at TCP.onStreamRead (node:internal/stream_base_commons:190:23)
    --------------------
    at Protocol._enqueue (/srv/service/node_modules/mysql/lib/protocol/Protocol.js:144:48)
    at Connection.query (/srv/service/node_modules/mysql/lib/Connection.js:198:25)
    at node:internal/util:411:7
    at new Promise (<anonymous>)
    at Connection.query (node:internal/util:397:12)
    at SectionSuggester.querySectionMapping (file:///srv/service/lib/suggestion/SectionSuggester.js:54:27)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async SectionSuggester.getSectionMapping (file:///srv/service/lib/suggestion/SectionSuggester.js:119:19)
    at async SectionSuggester.getMissingSections (file:///srv/service/lib/suggestion/SectionSuggester.js:159:19)
    at async suggestSections (file:///srv/service/lib/routes/v2.js:371:20)
query
SELECT source_title, target_title, frequency
				FROM titles
				WHERE source_language='en'
				AND target_language='bn'
				AND source_title IN ()
				ORDER BY source_title, frequency DESC
Impact

Not major but spammy logs in logstash.

Screen Shot 2025-04-25 at 10.47.52.png (3×1 px, 233 KB)

Notes

Section mapping API fails

Reproduce with: /v2/suggest/sections/Brochand/en/bn

Event Timeline

abi_ renamed this task from /v2/suggest/sections/{title}/{from}/{to}: Error in your SQL syntax; check manual for the right syntax to use near ') to /v2/suggest/sections/{title}/{from}/{to}: Error in your SQL syntax; check for the right syntax to use near ').Apr 25 2025, 5:18 AM
abi_ claimed this task.
abi_ triaged this task as Medium priority.
abi_ updated the task description. (Show Details)
abi_ set the point value for this task to 2.
abi_ added a project: CX-cxserver.

Change #1138955 had a related patch set uploaded (by Abijeet Patro; author: Abijeet Patro):

[mediawiki/services/cxserver@master] SectionSuggester: Handle the case when there are no source sections

https://gerrit.wikimedia.org/r/1138955

Change #1138955 merged by jenkins-bot:

[mediawiki/services/cxserver@master] SectionSuggester: Handle case when there are no source sections

https://gerrit.wikimedia.org/r/1138955

Change #1139214 had a related patch set uploaded (by KartikMistry; author: KartikMistry):

[operations/deployment-charts@master] Update cxserver to 2025-04-25-063512-production

https://gerrit.wikimedia.org/r/1139214

Change #1139214 merged by jenkins-bot:

[operations/deployment-charts@master] Update cxserver to 2025-04-25-063512-production

https://gerrit.wikimedia.org/r/1139214

Mentioned in SAL (#wikimedia-operations) [2025-04-28T06:29:11Z] <kart_> Updated cxserver to 2025-04-25-063512-production (T392662)