Cool, there is the reason for null byte. And it is fixed in 8.11.1, good. Question is if we want guard rails for people with already messed-up zk content..
Jan Høydahl > On 11 Nov 2024, at 13:01, Steffen Moldenhauer > <s.moldenha...@intershop.de.invalid> wrote: > > Maybe it is something as described in this issue: > https://issues.apache.org/jira/browse/SOLR-16110 > > Regards > Steffen > >> -----Original Message----- >> From: Jan Høydahl <jan....@cominvent.com> >> Sent: Monday, November 11, 2024 11:20 AM >> To: users@solr.apache.org >> Subject: Re: configset api in 8.11? >> >> Hi, >> >> I agree that an additional safeguard for what is deemed "empty" could be >> added >> here. If you like to attempt a Pull Request, feel free. Or if not, perhaps >> create a >> JIRA issue. >> >> Jan >> >>>> 9. nov. 2024 kl. 20:45 skrev Dmitri Maziuk <dmitri.maz...@gmail.com>: >>> >>> On 11/7/24 04:53, David Eric Pugh wrote: >>>> Would you mind testing this in either 9.7 or main? Make sure that we don't >> have a bug that needs fixing? >>> >>> @David, >>> >>> In case you haven't followed the thread: for some reason there is the 0x00 >> byte where Solr expects "no data or a JSON object" (quoting Jan); it's only >> in >> some configsets and we have no idea how it got there. >>> >>> Whether it's a bug or not, and whose, it may be worth adding a check before >> passing the value to JSON parser: the "\0" is "no data"/empty string, at >> least in >> traditional C definition. The trace shows it trying to parse the string "\0" >> (both >> dots below are 00 in hex): >>> >>> org.noggit.JSONParser$ParseException: JSON Parse Error: char=.,position=0 >> AFTER='.' BEFORE='' => org.noggit.JSONParser >>> $ParseException: JSON Parse Error: char=.,position=0 AFTER='.' BEFORE='' >>> >>> That is passed from >>> >> org.apache.solr.handler.admin.ConfigSetsHandler.handleConfigUploadRequest( >> ConfigSetsHandler.java:205) >>> to >>> org.apache.solr.common.util.Utils.fromJSON(Utils.java:305) >>> >>> It's probably a good idea to check if the string is zero-length somewhere >> between those two. >>> >>> Dima >>> >