Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
Impala 4.1.0
-
None
-
ghx-label-3
Description
For debugging codegen, it is useful to be able to inspect the generated assembly. The asm_module_dir startup parameter directs Impala to dump the codegen assembly to files in a directory. It currently dumps the assembly for a query into '${query_id}.asm', but there are actually multiple codegen operations going on in a single query and the output from one will overwrite the output from previous ones. I added a debug statement to the dumping code, and it gets called multiple times:
I0404 12:25:34.453413 6527 codegen-symbol-emitter.cc:58] 574df02d4b904ee9:9fa6181b00000001] Writing disassembly to: /data/Impala/logs/asm_module_dir/574df02d4b904ee9:9fa6181b00000000.asm I0404 12:25:34.463084 6528 codegen-symbol-emitter.cc:58] 574df02d4b904ee9:9fa6181b00000000] Writing disassembly to: /data/Impala/logs/asm_module_dir/574df02d4b904ee9:9fa6181b00000000.asm ... I0404 12:25:34.491320 6529 codegen-symbol-emitter.cc:58] 574df02d4b904ee9:9fa6181b00000004] Writing disassembly to: /data/Impala/logs/asm_module_dir/574df02d4b904ee9:9fa6181b00000000.asm
We should fix the filenames so that these collisions do not occur. One option would be to use the fragment id rather than the query id.