[ 
https://issues.apache.org/jira/browse/SOLR-5514?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13901445#comment-13901445
 ] 

Dirk Reuss  commented on SOLR-5514:
-----------------------------------

Hi Arun,Dongquive, Steve
thank you for taking the issue.
The problem is not  providing the wrong uuid, all uuids I put in the update 
statement are wellformed.
The problem is not that solr stored the wrong uuid, because if I retrieve the 
document the uuid fields contain wellformed values.
The problem is, if I do not include all uuid fields in the update statement, 
solr throws this exception. IMO this happens because solr internally loads the 
document, updates the field as given in the update statement/request and then 
stores the document again. I think  loading the uuid field is buggy sometimes. 
Because the error does not happen always it may depend one caches, 
multithreading, updatelog or other environment changes.
Here was a similar problem with uuids: 
* SOLR-3073: Fixed 'Invalid UUID string' error when having an UUID field as the 
unique key and executing a distributed grouping request. (Devon Krisman, 
Martijn van Groningen) see: https://issues.apache.org/jira/browse/SOLR-3073

Maybe the original problem for 3073 causes this exception?
The workaround for me is: put all uuids field in the update statement. 
At the moment I do not have the time to build a demo core for reproducing the 
error.

Here is an other issue with uuid:
https://issues.apache.org/jira/browse/SOLR-807
May be the binary serializer using the field a field type prefix? What if  the 
update log for atomic update would use binary serializer to build a changelog 
for documents?
Maybe somewhere a unmarshall is missing?


> atomic update throws exception if the schema contains uuid fields: Invalid 
> UUID String: 'java.util.UUID:e26c4d56-e98d-41de-9b7f-f63192089670'
> ---------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-5514
>                 URL: https://issues.apache.org/jira/browse/SOLR-5514
>             Project: Solr
>          Issue Type: Bug
>    Affects Versions: 4.5.1
>         Environment: unix and windows
>            Reporter: Dirk Reuss 
>            Assignee: Shalin Shekhar Mangar
>
> I am updating an exiting document with the statement 
> <add><doc><field name='name' update='set'>newvalue</field>....
> All fields are stored and I have several UUID fields. About 10-20% of the 
> update commands will fail with the message: (example)
> Invalid UUID String: 'java.util.UUID:532c9353-d391-4a04-8618-dc2fa1ef8b35'
> the point is that java.util.UUID seems to be prepended to the original uuid 
> stored in the field and when the value is written this error occours.
> I tried to check if this specific uuid field was the problem and
> added the uuid field in the update xml with(<field name='id1' 
> update='set'>...). But the error simply moved to an other uuid field.
> here is the original exception:
> <lst name="responseHeader"><int name="status">500</int><int 
> name="QTime">34</int></lst><lst name="error"><str name="msg">Error while 
> creating field 
> 'MyUUIDField{type=uuid,properties=indexed,stored,omitTermFreqAndPositions,required,
>  required=true}' from value 
> 'java.util.UUID:e26c4d56-e98d-41de-9b7f-f63192089670'</str><str 
> name="trace">org.apache.solr.common.SolrException: Error while creating field 
> 'MyUUIDField{type=uuid,properties=indexed,stored,omitTermFreqAndPositions,required,
>  required=true}' from value 
> 'java.util.UUID:e26c4d56-e98d-41de-9b7f-f63192089670'
>       at org.apache.solr.schema.FieldType.createField(FieldType.java:259)
>       at org.apache.solr.schema.StrField.createFields(StrField.java:56)
>       at 
> org.apache.solr.update.DocumentBuilder.addField(DocumentBuilder.java:47)
>       at 
> org.apache.solr.update.DocumentBuilder.toDocument(DocumentBuilder.java:118)
>       at 
> org.apache.solr.update.AddUpdateCommand.getLuceneDocument(AddUpdateCommand.java:77)
>       at 
> org.apache.solr.update.DirectUpdateHandler2.addDoc(DirectUpdateHandler2.java:215)
>       at 
> org.apache.solr.update.processor.RunUpdateProcessor.processAdd(RunUpdateProcessorFactory.java:69)
>       at 
> org.apache.solr.update.processor.UpdateRequestProcessor.processAdd(UpdateRequestProcessor.java:51)
>       at 
> org.apache.solr.update.processor.DistributedUpdateProcessor.doLocalAdd(DistributedUpdateProcessor.java:556)
>       at 
> org.apache.solr.update.processor.DistributedUpdateProcessor.versionAdd(DistributedUpdateProcessor.java:692)
>       at 
> org.apache.solr.update.processor.DistributedUpdateProcessor.processAdd(DistributedUpdateProcessor.java:435)
>       at 
> org.apache.solr.update.processor.LogUpdateProcessor.processAdd(LogUpdateProcessorFactory.java:100)
>       at 
> org.apache.solr.handler.loader.XMLLoader.processUpdate(XMLLoader.java:247)
>       at org.apache.solr.handler.loader.XMLLoader.load(XMLLoader.java:174)
>       at 
> org.apache.solr.handler.UpdateRequestHandler$1.load(UpdateRequestHandler.java:92)
>       at 
> org.apache.solr.handler.ContentStreamHandlerBase.handleRequestBody(ContentStreamHandlerBase.java:74)
>       at 
> org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135)
>       at org.apache.solr.core.SolrCore.execute(SolrCore.java:1859)
>       at 
> org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:703)
>       at 
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:406)
>       at 
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:195)
>       at 
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
>       at 
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>       at 
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
>       at 
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
>       at 
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
>       at 
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
>       at 
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
>       at 
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
>       at 
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852)
>       at 
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
>       at 
> org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
>       at java.lang.Thread.run(Thread.java:781)
> Caused by: org.apache.solr.common.SolrException: Invalid UUID String: 
> 'java.util.UUID:e26c4d56-e98d-41de-9b7f-f63192089670'
>       at org.apache.solr.schema.UUIDField.toInternal(UUIDField.java:89)
>       at org.apache.solr.schema.FieldType.createField(FieldType.java:257)



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to