Hi, I got a big problem with ACL caused by memory consomption of a batch. I have made here a *very simple batch command that you can find in attachment* so you can check if I missed something or not.
What does this batch ?
It takes a very simple object (created only for testing purpose) :
class TestDomainObject implements DomainObjectInterface
{
protected $id = 0;
public function __construct(){
}
public function setId($id){
$this->id = $id;
}
public function getObjectIdentifier() {
return strtoupper("TESTDO_".$this->id);
}
public function getId() {
return $this->id;
}
}
Then make a simple ACL creation with one ACE :
protected function testUpdateACL($id)
{
$this->testDomainObject->setId($id);
$objectIdentity =
ObjectIdentity::fromDomainObject($this->testDomainObject);
$acl = $this->aclProvider->createAcl($objectIdentity);
$adminIdentity = new RoleSecurityIdentity("ROLE_ADMIN");
$acl->insertObjectAce($adminIdentity, MaskBuilder::MASK_VIEW);
$this->aclProvider->updateAcl($acl);
}
Iterate 30000 times on this update :
for($i=0; $i<30000; $i++) {
$this->testUpdateACL($i);
if (($i % 2000) == 0) {
$output->write("Iteration =".$i." Memory = ".memory_get_usage().PHP_EOL);
}
}
I run the test taking care of no-debug option in env prod :
php app/console --no-debug --env="prod" acl:leak
*Result :*
Iteration =0 Memory = 30336888
Iteration =2000 Memory = 41741288
Iteration =4000 Memory = 57838048
Iteration =6000 Memory = 73056744
Iteration =8000 Memory = 89967144
Iteration =10000 Memory = 105108416
Iteration =12000 Memory = 119921520
Iteration =14000 Memory = 134733504
Iteration =16000 Memory = 153898744
Iteration =18000 Memory = 169364552
Iteration =20000 Memory = 184178000
Iteration =22000 Memory = 198991480
Iteration =24000 Memory = 213802848
Iteration =26000 Memory = 228772712
Iteration =28000 Memory = 243585680
Really need to find why I got this issue memory consumtion. Did I missed
something or is it a doctrine problem with DBAL ?
Thank you for help.
Y
--
If you want to report a vulnerability issue on symfony, please send it to
security at symfony-project.com
You received this message because you are subscribed to the Google
Groups "symfony developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-devs?hl=en
<<attachment: LeakAclCommand.php>>
