Project: datamanagement
Issue DM-289: More helpful location information for errors in duplicator/partitioner input
Currently, if the Qserv duplicator or partitioner encounters erroneous input (such as a formatting error, or missing columns), the error message it outputs does not include a mapping back to the location of the error, making it very hard/annoying indeed to fix that erroneous input. Fabrice would (quite reasonably) like to see a filename and line number in the error message. Unfortunately, producing a line number is complicated by the following facts: - multiple threads may be reading sub-sections of the same input file in parallel - sub-sections are not guaranteed to be read in order - lines can have varying length In other words, the code reading/parsing the input has no idea which line it is working on, and making that information available would involve either deferring error reports or extra synchronization (performance loss). What we can easily (and should) do is to arrange for processing code to know the file and byte offset of the input text being processed; error messages should include both pieces of information.
Story points: 2