[ 
https://issues.apache.org/jira/browse/DIRSERVER-1319?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12874550#action_12874550
 ] 

Emmanuel Lecharny commented on DIRSERVER-1319:
----------------------------------------------

You probably just have to modify the StringValue.serialize() method, and only 
take care of the wrappedValue and normalizedValue, as the ID won't be that big.

However, that would be interesting to replace all the writeUTF method by a call 
to something smarter, that will take care of both cases. 

You may even use your own way to write a String : write the length first, and 
then if it's above 20 000, then switch to the block system (a block will be a 
part of the string, preceded by the block's length). For instance, if we have 
to write a 50 000 chars long String, it will be stored as :
50000 (length), 20000 (block 1 length), <the first 20 000 chars>, 20000 (block 
2 length), <the next 20 000 chars>, 10000 (block 3 length), <the last 10 000 
chars>.

> Cannot save String values larger than 64 Kb 
> --------------------------------------------
>
>                 Key: DIRSERVER-1319
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-1319
>             Project: Directory ApacheDS
>          Issue Type: Bug
>    Affects Versions: 1.5.4
>            Reporter: Emmanuel Lecharny
>            Assignee: Felix Knecht
>             Fix For: 2.0.0-RC1
>
>
> We can't save String values into the server due to the way the entries are 
> serialized : we are using a OutputStream.writeUTF() which is limited to 65535 
> chars.
> We have two options :
> - we save data splitting them in smaller chuncks
> - we save a reference to a file, considering the data as a stream.
> The second option would be way better, but is more complicated to implement. 
> In any case, both system change the way the serialization works.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to