MagmaSoftwareError

Martin Beck martin.beck at hpi.uni-potsdam.de
Tue Jan 16 09:48:39 UTC 2007


Martin Beck schrieb:
> Hi there, now we have a new problem:
> We have a repository and connect with MagmaSession openLocal: to it. 
> Afterwards, we write save a MagmaCollection of Associations of strings 
> to objects to it. The string (Assocation>>key) is the indexed attribute.
> Our test case runs after doing this.
> But if we just save the image (with disconnected magmasession) we get 
> this if try to run the test again:
> "MagmaSoftwareError: The oids index for key was not found."

It seems, that we found our error. First, the script to test in a workspace:

repoDir := 'C:\MagmaRepo'.
(FileDirectory on: repoDir) assureExistence; deleteLocalFiles.

MagmaRepositoryController
     create: repoDir
     root: Dictionary new.

databaseSession := MagmaSession openLocal: repoDir.
databaseSession connectAs: 'squeak'.

databaseSession commit: [
	collection := MagmaCollection new.
	databaseSession root at: 'test' put: collection.
	collection addIndex:
	((MaSearchStringIndex
			attribute: #key)
				keySize: 64*8;
				setLowChar: 0 highChar: 255).
	collection add: ('a' -> #b).
].
(collection where: [:reader | reader read: #key at: 'a']) isEmpty.
databaseSession disconnect; closeRepository.

SmalltalkImage current saveChangesInFileNamed: 'dirtyCopy.changes'.
SmalltalkImage current saveImageInFileNamed: 'dirtyCopy.image'.
databaseSession := MagmaSession openLocal: repoDir.
databaseSession connectAs: 'squeak'.
((databaseSession root at: 'test') where: [:reader | reader read: #key 
at: 'a']) isEmpty.
databaseSession disconnect; closeRepository.



This doesn't work because of the keysize of 512 bits. This was our code 
- if we change the keysize to 256 bits, it works...
We know that a larger keysize would slow down the index, but we want 
more! ;)
Chris, how could we force a larger keysize?

Regards,
Martin


More information about the Magma mailing list