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

Erick Erickson commented on SOLR-6971:
--------------------------------------

On the face of it it's very strange. Here's the code leading up to that assert 
from DistributedQueue.java[120]

{noformat}
    List<String> childNames = zookeeper.getChildren(dir, null, true);
    stats.setQueueLength(childNames.size());
    for (String childName : childNames) {
      if (childName != null) {
        try {
          byte[] data = zookeeper.getData(dir + "/" + childName, null, null, 
true);
          if (data != null) {
            ZkNodeProps message = ZkNodeProps.load(data); // nocommit, called 
by CollectionsHandler, 687. Trips assert in ByteUtils.
{noformat}

The assert itself from ByteUtils is this bit of code:
{noformat}
      if (b < 0xc0) {
        assert b < 0x80;
        out[out_offset++] = (char)b;
{noformat}

where b is marching through the buffer passed in that has just been read from 
ZK. So on the face of it, this looks like somehow the data read from ZK is bad 
since this is being tripped by data read from ZK, not data passed in.

Seems like we need to dump the data in UTF8toUTF16, something like below. Is 
there precedent, i.e. some nifty buffer dumping already coded up somewhere I 
can use that would allow us to dump the UTF8 buffer in this case?

{noformat}
      if (b < 0xc0) {
        if (b < 0x80) {  dump lots of stuff here, current bytes decoded, the 
raw bytes, offset of offending character and all that }
        assert b < 0x80;
        out[out_offset++] = (char)b;

{noformat}

I'm traveling through Monday and won't have a lot of time to pursue this before 
then.

> TestRebalanceLeaders fails too often.
> -------------------------------------
>
>                 Key: SOLR-6971
>                 URL: https://issues.apache.org/jira/browse/SOLR-6971
>             Project: Solr
>          Issue Type: Test
>            Reporter: Mark Miller
>            Assignee: Erick Erickson
>            Priority: Minor
>
> I see this fail too much - I've seen 3 different fail types so far.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to