You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by "Dr. André Lanka" <ma...@dr-lanka.de> on 2013/02/14 09:52:14 UTC
TDB: StatementListener sometimes not called
Hello Jena/TDB developers
I found some issue (seems not to be in JIRA).
If I do
RDFNode any=null;
for (Statement statement : model.listStatements(object, property,
any).toList())
model.remove(statement);
All is fine and it works as expected, cool so far :)
But when I do
model.removeAll(object, property, any);
the statements are wiped correctly from the model yet the registered
StatementListener is NOT called for the removed statements.
This occurs in TDB backed graphs. For memory models the issue didn't
come up.
BTW: We implemented a global cache (for nodes and blocks) for TDB 0.9.4.
This is useful when you have plenty of TDB stores within the same
machine. The cache is shared by all stores and holds data stored in the
"traditional files" (We leave the transactional files untouched at the
moment). The cache is only implemented for direct file mode (seems to be
the better mode if you want to manage thousands of stores on a single
machine in parallel). If you are interested in, we would integrate our
changes to the official branch for one of the future TDB releases. Just
let us know.
Best
André
--
Dr. André Lanka * 0178 / 134 44 47 * http://dr-lanka.de
TDB global cache
Posted by Andy Seaborne <an...@apache.org>.
On 18/02/13 08:32, "Dr. André Lanka" wrote:
> Hi Andy,
>
> thanks for fixing it so fast :)
>
> What is your usual way to integrate "third-party-features" like our
> cache? Is there a separate code branch or do you take a patch for the
> current snapshot?
Either way - basing it from the latest trunk reduces the potential
unnecessary conflicts. A patch is most convenient to merge back to
trunk or to create branch in Jena SVN.
Whether we want to create a new branch or place the functionality
(default off) to trunk will depend on how it all fits together. Not
having seen the code, I can't tell.
> We will exercise our changes in our production systems during the next
> three weeks. Provided we find no issues, we would integrate our code the
> official TDB at the mid of March. Would this work for you?
That would be great.
We'll get it into the TDB and let other people experiment with it.
Andy
>
> Best
> André
>
>
>
>
> On 17.02.2013 12:49, Andy Seaborne wrote:
>> Turns out to be simpler than I thought!
>>
>> Recorded and fixed as JENA-395
>>
>> Andy
>>
>> On 14/02/13 18:08, Andy Seaborne wrote:
>>> Hi André,
>>>
>>> On 14/02/13 08:52, "Dr. André Lanka" wrote:
>>>> Hello Jena/TDB developers
>>>>
>>>> I found some issue (seems not to be in JIRA).
>>>>
>>>> If I do
>>>>
>>>> RDFNode any=null;
>>>> for (Statement statement : model.listStatements(object, property,
>>>> any).toList())
>>>> model.remove(statement);
>>>>
>>>> All is fine and it works as expected, cool so far :)
>>>>
>>>> But when I do
>>>>
>>>> model.removeAll(object, property, any);
>>>>
>>>> the statements are wiped correctly from the model yet the registered
>>>> StatementListener is NOT called for the removed statements.
>>>>
>>>> This occurs in TDB backed graphs. For memory models the issue didn't
>>>> come up.
>>>
>>> Which version of Jena is this? 2.9.4 or 2.10.0-SNAPSHOT?
>>>
>>> (see the recent announcement of 2.10.0 testing - there are changes in
>>> this area althoug maybe not directly)
>>>
>>>> BTW: We implemented a global cache (for nodes and blocks) for TDB
>>>> 0.9.4.
>>>> This is useful when you have plenty of TDB stores within the same
>>>> machine. The cache is shared by all stores and holds data stored in the
>>>> "traditional files" (We leave the transactional files untouched at the
>>>> moment). The cache is only implemented for direct file mode (seems
>>>> to be
>>>> the better mode if you want to manage thousands of stores on a single
>>>> machine in parallel). If you are interested in, we would integrate our
>>>> changes to the official branch for one of the future TDB releases. Just
>>>> let us know.
>>>
>>> Yes, please.
>>>
>>> Andy
>>>
>>>>
>>>> Best
>>>> André
>>>>
>>>>
>>>
>>
>
Re: TDB: StatementListener sometimes not called
Posted by "Dr. André Lanka" <ma...@dr-lanka.de>.
Hi Andy,
thanks for fixing it so fast :)
What is your usual way to integrate "third-party-features" like our
cache? Is there a separate code branch or do you take a patch for the
current snapshot?
We will exercise our changes in our production systems during the next
three weeks. Provided we find no issues, we would integrate our code the
official TDB at the mid of March. Would this work for you?
Best
André
On 17.02.2013 12:49, Andy Seaborne wrote:
> Turns out to be simpler than I thought!
>
> Recorded and fixed as JENA-395
>
> Andy
>
> On 14/02/13 18:08, Andy Seaborne wrote:
>> Hi André,
>>
>> On 14/02/13 08:52, "Dr. André Lanka" wrote:
>>> Hello Jena/TDB developers
>>>
>>> I found some issue (seems not to be in JIRA).
>>>
>>> If I do
>>>
>>> RDFNode any=null;
>>> for (Statement statement : model.listStatements(object, property,
>>> any).toList())
>>> model.remove(statement);
>>>
>>> All is fine and it works as expected, cool so far :)
>>>
>>> But when I do
>>>
>>> model.removeAll(object, property, any);
>>>
>>> the statements are wiped correctly from the model yet the registered
>>> StatementListener is NOT called for the removed statements.
>>>
>>> This occurs in TDB backed graphs. For memory models the issue didn't
>>> come up.
>>
>> Which version of Jena is this? 2.9.4 or 2.10.0-SNAPSHOT?
>>
>> (see the recent announcement of 2.10.0 testing - there are changes in
>> this area althoug maybe not directly)
>>
>>> BTW: We implemented a global cache (for nodes and blocks) for TDB 0.9.4.
>>> This is useful when you have plenty of TDB stores within the same
>>> machine. The cache is shared by all stores and holds data stored in the
>>> "traditional files" (We leave the transactional files untouched at the
>>> moment). The cache is only implemented for direct file mode (seems to be
>>> the better mode if you want to manage thousands of stores on a single
>>> machine in parallel). If you are interested in, we would integrate our
>>> changes to the official branch for one of the future TDB releases. Just
>>> let us know.
>>
>> Yes, please.
>>
>> Andy
>>
>>>
>>> Best
>>> André
>>>
>>>
>>
>
--
Dr. André Lanka * 0178 / 134 44 47 * http://dr-lanka.de
Re: TDB: StatementListener sometimes not called
Posted by Andy Seaborne <an...@apache.org>.
Turns out to be simpler than I thought!
Recorded and fixed as JENA-395
Andy
On 14/02/13 18:08, Andy Seaborne wrote:
> Hi André,
>
> On 14/02/13 08:52, "Dr. André Lanka" wrote:
>> Hello Jena/TDB developers
>>
>> I found some issue (seems not to be in JIRA).
>>
>> If I do
>>
>> RDFNode any=null;
>> for (Statement statement : model.listStatements(object, property,
>> any).toList())
>> model.remove(statement);
>>
>> All is fine and it works as expected, cool so far :)
>>
>> But when I do
>>
>> model.removeAll(object, property, any);
>>
>> the statements are wiped correctly from the model yet the registered
>> StatementListener is NOT called for the removed statements.
>>
>> This occurs in TDB backed graphs. For memory models the issue didn't
>> come up.
>
> Which version of Jena is this? 2.9.4 or 2.10.0-SNAPSHOT?
>
> (see the recent announcement of 2.10.0 testing - there are changes in
> this area althoug maybe not directly)
>
>> BTW: We implemented a global cache (for nodes and blocks) for TDB 0.9.4.
>> This is useful when you have plenty of TDB stores within the same
>> machine. The cache is shared by all stores and holds data stored in the
>> "traditional files" (We leave the transactional files untouched at the
>> moment). The cache is only implemented for direct file mode (seems to be
>> the better mode if you want to manage thousands of stores on a single
>> machine in parallel). If you are interested in, we would integrate our
>> changes to the official branch for one of the future TDB releases. Just
>> let us know.
>
> Yes, please.
>
> Andy
>
>>
>> Best
>> André
>>
>>
>
Re: TDB: StatementListener sometimes not called
Posted by Andy Seaborne <an...@apache.org>.
Hi André,
On 14/02/13 08:52, "Dr. André Lanka" wrote:
> Hello Jena/TDB developers
>
> I found some issue (seems not to be in JIRA).
>
> If I do
>
> RDFNode any=null;
> for (Statement statement : model.listStatements(object, property,
> any).toList())
> model.remove(statement);
>
> All is fine and it works as expected, cool so far :)
>
> But when I do
>
> model.removeAll(object, property, any);
>
> the statements are wiped correctly from the model yet the registered
> StatementListener is NOT called for the removed statements.
>
> This occurs in TDB backed graphs. For memory models the issue didn't
> come up.
Which version of Jena is this? 2.9.4 or 2.10.0-SNAPSHOT?
(see the recent announcement of 2.10.0 testing - there are changes in
this area althoug maybe not directly)
> BTW: We implemented a global cache (for nodes and blocks) for TDB 0.9.4.
> This is useful when you have plenty of TDB stores within the same
> machine. The cache is shared by all stores and holds data stored in the
> "traditional files" (We leave the transactional files untouched at the
> moment). The cache is only implemented for direct file mode (seems to be
> the better mode if you want to manage thousands of stores on a single
> machine in parallel). If you are interested in, we would integrate our
> changes to the official branch for one of the future TDB releases. Just
> let us know.
Yes, please.
Andy
>
> Best
> André
>
>