Hi,

I am using jackrabbit version 2.4.3 with versioning.
Please find attached my repository.xml.
I am using MySqlPersistenceManager.
I have 2 hosts ( each with its own clusterId) sharing the same workspace in the repository.
When we enabled versioning, our consistency check on startup increased to nearly an hour and half , sometimes more.
Also, within 3 days, our hosts were recording lots of errors on itemSave and invalidItemState exceptions. Eventually our machine became  un-responsive so we had to disable versioning.

While debugging the root cause, I found the following:

the V_ are the versioning related tables
I was hoping that rowcount(R_V_PM_BUNDLE ) <= row count(  R_PM_DEFAULT_BUNDLE) since they both contain NODE_ID as foreign key.
The nodeIds seem to be in some encoded / compressed format so I couldn't compare the columns directly.
But my understanding from the  JSR spec is that there should be 1-1 correspondence between the actual nodes and their versioned storage.
1. Can the number of nodes in version bundle be greater than that in the workspace bundle table?
2. Is there some cleanup functionality for versioning, if so, how can I configure it?
3. Is there any way to fasten the consistency check?
4. Are these any limitations/recommendations related to the number of nodes as far as versioning goes?


select table_schema, table_type, table_name, table_rows from INFORMATION_SCHEMA.TABLES  where table_rows>=1;
+---------------+------------+---------------------------------------------------+------------+
| table_schema  | table_type | table_name                                        | table_rows |
+---------------+------------+---------------------------------------------------+------------+
correctzestdb | BASE TABLE | J_GLOBAL_REVISION                                 |          1 |
| correctzestdb | BASE TABLE | J_JOURNAL                                         |      31824 |
| correctzestdb | BASE TABLE | J_LOCAL_REVISIONS                                 |          2 |
| correctzestdb | BASE TABLE | QRTZ_CRON_TRIGGERS                                |          3 |
| correctzestdb | BASE TABLE | QRTZ_JOB_DETAILS                                  |          3 |
| correctzestdb | BASE TABLE | QRTZ_LOCKS                                        |          5 |
| correctzestdb | BASE TABLE | QRTZ_SCHEDULER_STATE                              |          2 |
| correctzestdb | BASE TABLE | QRTZ_TRIGGERS                                     |          3 |
| correctzestdb | BASE TABLE | R_FS_DEFAULT_FSENTRY                              |          1 |
| correctzestdb | BASE TABLE | R_FS_FSENTRY                                      |          8 |
| correctzestdb | BASE TABLE | R_FS_SECURITY_FSENTRY                             |          1 |
| correctzestdb | BASE TABLE | R_PM_DEFAULT_BUNDLE                               |     142970 |
| correctzestdb | BASE TABLE | R_PM_SECURITY_BUNDLE                              |         10 |
| correctzestdb | BASE TABLE | R_V_FS_FSENTRY                                    |          1 |
| correctzestdb | BASE TABLE | R_V_PM_BUNDLE                                     |     450445 |
| correctzestdb | BASE TABLE | R_V_PM_REFS                                       |        600 |
| correctzestdb | BASE TABLE | accounts                                          |         64 |

mysql> desc correctzestdb.R_PM_DEFAULT_BUNDLE   ;
+-------------+---------------+------+-----+---------+-------+
| Field       | Type          | Null | Key | Default | Extra |
+-------------+---------------+------+-----+---------+-------+
| NODE_ID     | varbinary(16) | NO   | PRI | NULL    |       |
| BUNDLE_DATA | longblob      | NO   |     | NULL    |       |
+-------------+---------------+------+-----+---------+-------+
2 rows in set (0.00 sec)

mysql> desc correctzestdb. R_V_PM_BUNDLE;
+-------------+---------------+------+-----+---------+-------+
| Field       | Type          | Null | Key | Default | Extra |
+-------------+---------------+------+-----+---------+-------+
| NODE_ID     | varbinary(16) | NO   | PRI | NULL    |       |
| BUNDLE_DATA | longblob      | NO   |     | NULL    |       |
+-------------+---------------+------+-----+---------+-------+
2 rows in set (0.00 sec)