[Glass] Mixing Unicode and String instances in Indexes [WAS] Re: Further commits have been disabled for this session because: 'CorruptObj error'. This session must logout.

Dale Henrichs via Glass glass at lists.gemtalksystems.com
Wed Nov 4 16:09:34 PST 2015



On 11/04/2015 04:00 PM, Mariano Martinez Peck wrote:
>
>
> On Wed, Nov 4, 2015 at 8:49 PM, Dale Henrichs 
> <dale.henrichs at gemtalksystems.com 
> <mailto:dale.henrichs at gemtalksystems.com>> wrote:
>
>
>
>     On 11/04/2015 11:02 AM, Mariano Martinez Peck wrote:
>
>         Hi Dale,
>
>         Thanks for all the answers and explanations. Hopefully this
>         was worth.
>
>         If you open an internal bug please simply let me know the
>         internal bug number since I am keeping a list of the issues I
>         found (with their state).
>
>     bug 45812 covers this report ... as I said before I'm still not
>     sure that I can get rid of the corrutp obj error, but I am pretty
>     that I can improve the error message produced by the
>     IndexingErrorPreventingCommit error (a
>     IndexingErrorPreventingCommit occurred (error 2726), errors during
>     index maintenance; commit will be disallowed) by including the
>     root error in the error message ...
>
>
> Great. Thanks for letting me know.
>
>     This was definitely worth it ...
>
>
> BTW, sometimes we take things for granted without realizing it...did 
> you see how difficult it was for me to reproduce the problem with 
> gsDevKit_home? With 3 lines of code I was able to get a fresh 3.1.0.6 
> stone, create indexes,  upgrade it to 3.2.9, and then reproduce the bug.
> Honestly, without gsDevKit_home I would have not tried to reproduce 
> this as the effort would have been huge.
>

Haha, no kidding ... I used the GsDevKit_home bash scripts plus the 
attached index script to my internal bug report with the following 
instructions:

1) $GS_HOME/bin/createStone -f gs_3106 3.1.0.6

2)in tODE using the attached tODE script:

    /home/index --clean --create --query --edit

3) $GS_HOMEbin/upgradeStone -f gs_3106 gs_329 3.2.9

4) then in tODE using attached tODE script:

    /home/index --boom   # to get the root error
or
    /home/index --update # to get the IndexingErrorPreventingCommit error

(of course you have to move the .ston file to 
$GS_HOME/sys/local/server/home to see it)

Dale

And right before submitting the bug, I went through the whole sequence 
just to make sure that it broke the way it was supposed to
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gemtalksystems.com/mailman/private/glass/attachments/20151104/772d46f2/attachment.html>
-------------- next part --------------
TDScriptLeafNode{#name:'index',#contents:'[ :topez :objIn :tokens :command :commandNode | 
  | opts args |
  \"for help: ./index -h\"
  command
    getOptsMixedLongShort:
      {#(\'help\' $h #\'none\').
      #(\'boom\' nil #\'none\').
      #(\'clean\' nil #\'none\').
      #(\'create\' nil #\'none\').
      #(\'edit\' nil #\'none\').
      #(\'update\' nil #\'none\').
      #(\'query\' nil #\'none\')}
    optionsAndArguments: [ :options :operands | 
      opts := options.
      args := operands ].
  opts
    at: \'help\'
    ifAbsent: [ 
      opts
        at: \'clean\'
        ifPresent: [ :ignored | 
          UserGlobals at: #\'MARIANO_BAG\' ifPresent: [ :bag | bag removeAllIndexes ].
          UserGlobals removeKey: #\'MARIANO_BAG\' ifAbsent: [  ].
          IndexManager removeAllIndexes ].
      opts
        at: \'create\'
        ifPresent: [ :ignored | 
          | bag |
          bag := RcIdentityBag new.
          bag
            add: 1 -> \'ascii\';
            add: 2 -> \'unicode\' asUnicodeString;
            yourself.
          bag createEqualityIndexOn: \'value\' withLastElementClass: String.
          UserGlobals at: #\'MARIANO_BAG\' put: bag ].
      opts
        at: \'edit\'
        ifPresent: [ :ignored | (UserGlobals at: #\'MARIANO_BAG\') edit: topez ].
      opts
        at: \'update\'
        ifPresent: [ :ignored | 
          | bag val |
          bag := UserGlobals at: #\'MARIANO_BAG\'.
          val := \'unicode2\' asUnicodeString.
          bag add: 3 -> val ].
      opts
        at: \'query\'
        ifPresent: [ :ignored | 
          | bag val |
          bag := UserGlobals at: #\'MARIANO_BAG\'.
          val := \'ascii\' asString.
          bag select: { :each | each.value = val } ].
      opts
        at: \'boom\'
        ifPresent: [ :ignored | 
          | collectionsWithBadIndexes |
          IndexManager current removeAllIncompleteIndexes.
          collectionsWithBadIndexes := IndexManager current nscsWithBadIndexes.
          Transcript
            show:
                \'There are \' , collectionsWithBadIndexes size asString
                    , \' collections with bad indexes.\';
            cr.
          Transcript show: \'The following are the OOPs of such collections: \'.
          collectionsWithBadIndexes
            do: [ :each | Transcript show: \' - \' , each asOop asString ].
          Transcript cr ] ]
    ifPresent: [ :ignored | 
      TDManPage
        viewManPage:
          \'NAME
  index - index sript utility template
SYNOPSIS
  index [-h|--help]
DESCRIPTION
EXAMPLES
  ./index --help
  ./index -h

  ./index --clean
  ./index --create
  ./index --query
  ./index --edit
  ./index --clean --create --query --edit
  ./index --boom
  ./index --update
\'
        topez: topez ] ]',#creationTime:DateAndTime['2015-10-28T11:10:54.94312906265259-07:00'],#modificationTime:DateAndTime['2015-11-04T15:32:29.4860920906066-08:00']}


More information about the Glass mailing list