Skip Menu |

This queue is for tickets about the REST-Neo4p CPAN distribution.

Report information
The Basics
Id: 92800
Status: resolved
Priority: 0/
Queue: REST-Neo4p

People
Owner: maj.fortinbras [...] gmail.com
Requestors: stesin [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.2233
Fixed in: (no value)



Subject: Batch creation failure
Trying to do batch import. I have 3 hashes with firstnames (ab. 100k), lastnames (ab. 1000) and midnames (ab. 2000). Code looks like this: batch { for $n ( keys( %firstname_hash ) ) { $f = REST::Neo4p::Node->new( { name_ua => $n, rate => $firstname_hash{ $n }, gender => $gender_hash{ $n } } ); $f->set_labels( 'FirstName' ); } ... the same for 2 other hashes... } Initially database is clean, no nodes at all. The above code creates some random quantity of nodes (10+? 20+? never more than 100) then fails silently without any diagnostics. Script just stops. Thanks in advance! WBR, Andrii
From: stesin [...] gmail.com
Found the cause. Without explicit use REST::Neo4p::Batch the statement batch {} '...' did not work but did not produce any diagnostics either. When 'use' was added, batch insertion went, hmmm, Ok.
From: stesin [...] gmail.com
Strange enough, batch { ... } 'discard_objs'; doesn't work for me at 2240 revision. As I told earlier, I stored some 100k lastnames in memory, then made an attempt to insert them without 'batch'. Script failed at some random place (about after 3-5 nodes) silently (no diagnostics). Tried to enclose the same piece of junkcode with batch { ... } 'discard_objs'; This time the result was somewhat better: about 22000 nodes were created, script stuck for some 10 minutes or so, then completed without visible failure, but the total quantity of created nodes is much-much less than was intended... :(
Ok Andrii- starting to look at this problem. Must be very frustrating! MAJ On Fri Feb 14 08:10:21 2014, stesin@gmail.com wrote: Show quoted text
> Strange enough, batch { ... } 'discard_objs'; doesn't work for me at > 2240 revision. > As I told earlier, I stored some 100k lastnames in memory, then made > an attempt to insert them without 'batch'. Script failed at some > random place (about after 3-5 nodes) silently (no diagnostics). > Tried to enclose the same piece of junkcode with batch { ... } > 'discard_objs'; > This time the result was somewhat better: about 22000 nodes were > created, script stuck for some 10 minutes or so, then completed > without visible failure, but the total quantity of created nodes is > much-much less than was intended... :(
Subject: RE: [rt.cpan.org #92800] Batch creation failure
Date: Mon, 17 Feb 2014 11:13:49 -0500
To: bug-REST-Neo4p [...] rt.cpan.org
From: Mark Jensen <jensen [...] fortinbras.us>
use warnings; This will catch the fact that 'batch ' is not defined as a function anywhere. The Batch.pm docs state that you need to explicitly 'use' the module. MAJ Sent from my T-Mobile 4G LTE Device Show quoted text
-------- Original message -------- From: "stesin@gmail.com via RT" <bug-REST-Neo4p@rt.cpan.org> Date: 02/07/2014 5:43 AM (GMT-05:00) To: Subject: [rt.cpan.org #92800] Batch creation failure        Queue: REST-Neo4p Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=92800 > Found the cause. Without explicit use REST::Neo4p::Batch the statement batch {} '...' did not work but did not produce any diagnostics either. When 'use' was added, batch insertion went, hmmm, Ok.