kazu2012 / persevere-framework

Automatically exported from code.google.com/p/persevere-framework
0 stars 0 forks source link

Weird object omissions and duplicates when sorting... Index issues? #203

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I have a couple Nodes... ( sl( ) == serialize( load( ) ) )

js>sl( "Node" )
[
{"id":"Node/2",
        "name":"PhanLabs",
        "lastContact":new Date(1244674658753),
},
{"id":"Node/3",
        "name":"GoCohere",
        "lastContact":new Date(1244674663700)
},
{"id":"Node/3",
        "name":"GoCohere",
       "lastContact":new Date(1244674663700)
}
]

When I ask for them sorted by name, I get different objects and same
duplicates:

js>sl( "Node/[/name]" )
[
{"id":"Node/1",
        "name":"Cohere Main",
},
{"id":"Node/3",
        "name":"GoCohere",
},
{"id":"Node/3",
        "name":"GoCohere"
}
]

Duplicated "GoCohere" and weird "Cohere Main" that doesn't exist in the
table any more.

js>sl( "Node/[\\name]" )
[
{"id":"Node/2",
        "name":"PhanLabs"
},
{"id":"Node/2",
        "name":"PhanLabs"
},
{"id":"Node/3",
        "name":"GoCohere"
}
]

Now I get duplicated other object "Phanlabs"...

This happens fairly often...

Running latest and greatest code.  Sometimes these objects are being
manipulated in a separate Thread.

Original issue reported on code.google.com by davidthi...@gmail.com on 10 Jun 2009 at 11:05

GoogleCodeExporter commented 8 years ago
Do you think you could make a reproducible test case of getting the DB indexes 
into 
this state from a blank DB?

Original comment by kris...@gmail.com on 14 Jun 2009 at 3:26

GoogleCodeExporter commented 8 years ago
OK, I think I have this one figured out, just need to fix it now.

Original comment by kris...@gmail.com on 19 Jun 2009 at 3:29

GoogleCodeExporter commented 8 years ago

Original comment by kris...@gmail.com on 20 Jun 2009 at 3:54