You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This looks like a regression. We had that problem already. The file to store the index is only created if the indexed dictionary is a root object / a cluster object.
The text was updated successfully, but these errors were encountered:
But we do not do it in SoilPersistentDictionary>>#add:
This is not a good solution, as we never make the value a root if the transaction is not set.
We need to revisit now to deal with this and make sure SoilPersistentDictionary and SoilIndexedDictionary work the same way wrt to how to set the tansaction.
For the SoilIndexedDictionary, the transaction is only set in #soilClusterRootIn:, thus only a SoilIndexedDictionary that is a root itself knows the transaction
Setting the transaction is not enough, if we add the accessor, the following tests fails when trying to read from the second transaction, we get a SoilIndexNotFound error:
testIndexedDictionaryNotRoot
| tx tx2 |
tx := soil newTransaction.
tx root: Dictionary new.
tx root at: #indexed put: dict.
"We need to set the transaction"
dict transaction: tx.
dict at: #foo2 put: #two.
dict at: #foo put: #one.
tx commit.
"The following tests that everything works"
tx2 := soil newTransaction.
"and test first"
self assert: ((tx2 root at: #indexed) at: #foo) equals: #one.
self assert: ((tx2 root at: #indexed) at: #foo2) equals: #two
This looks like a regression. We had that problem already. The file to store the index is only created if the indexed dictionary is a root object / a cluster object.
The text was updated successfully, but these errors were encountered: