[DC-955] Loading fixtures containing data for Versionable/Searchable Models fails due to Duplicate-Key errors Created: 14/Jan/11  Updated: 14/Jan/11

Status: Open
Project: Doctrine 1
Component/s: Behaviors, Data Fixtures, Import/Export, Searchable
Affects Version/s: 1.2.3
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Daniel Reiche Assignee: Jonathan H. Wage
Resolution: Unresolved Votes: 1
Labels: None
Environment:

PHP 5.3.3 / symfony 1.4.9-dev / MySQL 5.0



 Description   

Sample schema:

Blog:
actAs: [Versionable, Searchable]
columns:
id:

{ type: integer, primary: true, autoincrement: true }

name: string
text: text

When dumping data of a schema with Versionable and/or Searchable Behaviour, the dump.yml will contain all data, including the *_version and *_index tables.

Trying to load the same .yml file results in Duplicate-Key constraint violations, as long as the data for the *_version and *_index tables is present.
The import is only successfull, when the data for these tables is discarded.
This leads to the issue, that one can only do a dump-load cycle, when the complete version history of a Model is discarded. Which makes dump-load for such models rather useless.






[DC-956] Validation error (unique) when inserting an object with Searchable behavior Created: 20/Jan/11  Updated: 20/Jan/11

Status: Open
Project: Doctrine 1
Component/s: Searchable
Affects Version/s: 1.2.3
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Axel Guckelsberger Assignee: Jonathan H. Wage
Resolution: Unresolved Votes: 0
Labels: None
Environment:

Ubuntu Linux with Apache 2 and PHP 5.3.



 Description   

As soon as one enables the Searchable behavior like the following it is not possible anymore to create or update an entity.

public function setTableDefinition()

Unknown macro: { $this->setTableName('seartest_article'); $this->hasColumn('articleid', 'integer', 11, array( 'type' => 'integer', 'primary' => true, 'autoincrement' => true, 'unsigned' => true, 'notnull' => false, 'unique' => true, 'length' => 11 ) ); $this->hasColumn('title', 'string', 255, array( 'type' => 'string', 'notnull' => false, 'length' => 255 ) ); $this->hasColumn('description', 'string', null, array( 'type' => 'string', 'notnull' => false, 'length' => null ) ); $this->option('type', 'INNODB'); $this->option('collate', 'utf8_unicode_ci'); $this->option('charset', 'utf8'); }

public function setUp()

Unknown macro: { // Search support $search = new Doctrine_Template_Searchable(array( 'fields' => array('title', 'description'), 'batchUpdate' => false ) ); $this->actAs($search); $this->addListener(new SearchableTest_Model_ArticleListener()); }

After trying to create a new item the following error message appears (note the record class is called SearchableTest_Model_Article and the primary id column is named articleid):

Validation failed in class SearchableTest_Model_ArticleIndex 1 field had validation error: * 1 validator failed on articleid (unique)






[DC-788] Reopen DC-125. Searchable: batchUpdateIndex has a memory leak Created: 15/Jul/10  Updated: 15/Jul/10

Status: Open
Project: Doctrine 1
Component/s: Searchable
Affects Version/s: 1.2.2
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Fred Luhamaa Assignee: Jonathan H. Wage
Resolution: Unresolved Votes: 1
Labels: None
Environment:

php5.3.2, mysql 5.1, centos 5



 Description   

batchUpdateIndex leaks memory when indexing a table



 Comments   
Comment by Fred Luhamaa [ 15/Jul/10 ]

I'm using Doctrine 1.2.2 with Symfony 1.4.7-dev ( both latest from Symfony svn).

I have table with approx ~300 000 rows.

Doctrine::getTable('sfVideo')->batchUpdateIndex(); running this command will end after ~10 seconds.
Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 71 bytes) in /usr/share/symfony/1.4/lib/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Connection.php on line 800

Memory is leaking constantly even if using offset and limit.

Doctrine::getTable('sfVideo')->batchUpdateIndex(10000, 25000);





Generated at Thu Oct 02 08:52:44 UTC 2014 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.