configuration - Modeshape: how to configure JDBC storage option for the indexes -
i using modeshape 3.6.0.final jboss 6 eap.
according https://github.com/modeshape/modeshape/blob/master/deploy/jbossas/modeshape-jbossas-subsystem/src/main/resources/schema/modeshape_1_0.xsd previous element
cache-index-storage
for configuring cache amongst others via jdbc have been removed.
i found configurations , achieve:
<cache-index-storage cache-container-jndi-name="index_cache_container" lock-cache-name="index_locks" data-cache-name="index_data" metadata-cache-name="index_metadata"/> and cache container
<!-- index storage, metadata , locks --> <cache-container name="index_cache_container" default-cache="index_data"> <local-cache name="index_locks"> <transaction mode="non_xa"/> <string-keyed-jdbc-store datasource="java:jboss/datasources/mysqlds" passivation="false" purge="false"> <property name="databasetype">mysql</property> <property name="createtableonstart">true</property> <string-keyed-table prefix="stringbased"> <id-column name="id_column" type="varchar(255)"/> <data-column name="data_column" type="blob"/> <timestamp-column name="timestamp_column" type="bigint"/> </string-keyed-table> </string-keyed-jdbc-store> </local-cache> <local-cache name="index_data" batching="true"> <transaction mode="non_xa"/> <string-keyed-jdbc-store datasource="java:jboss/datasources/mysqlds" passivation="false" purge="false"> <property name="databasetype">mysql</property> <property name="createtableonstart">true</property> <string-keyed-table prefix="stringbased"> <id-column name="id_column" type="varchar(255)"/> <data-column name="data_column" type="blob"/> <timestamp-column name="timestamp_column" type="bigint"/> </string-keyed-table> </string-keyed-jdbc-store> </local-cache> <local-cache name="index_metadata"> <transaction mode="non_xa"/> <string-keyed-jdbc-store datasource="java:jboss/datasources/mysqlds" passivation="false" purge="false"> <property name="databasetype">mysql</property> <property name="createtableonstart">true</property> <string-keyed-table prefix="stringbased"> <id-column name="id_column" type="varchar(255)"/> <data-column name="data_column" type="blob"/> <timestamp-column name="timestamp_column" type="bigint"/> </string-keyed-table> </string-keyed-jdbc-store> </local-cache> </cache-container> can give me hint on how configure cache indexes modeshape 3.6.0.final such stored in database?
thanks in advance help?
the modeshape community removed support storing lucene indexes inside database because performed horribly, writes since concurrent changes content on different processes each compete writes database. in non-clustered topology, storing indexes in database not recommended due performance.
it better have each process in cluster maintain own complete copy of index. yes, add work each write (since write has done on each process), improves query performance , eliminates potential cluster-wide write conflicts, increasing update throughput of system.
of course still possible store indexes in infinispan. modeshape kept option because infinispan can configured in ways don't use shared storage (essentially making each process have independent indexes), , in these configurations there no cluster-wide index write conflict. storing indexes in shared database again there cluster-wide index write conflicts.
you can try out if want, , if make sure each of 3 caches stored in separate database table (using unique value "prefix" attribute).
however, encourage not store indexes in relational database or location shared multiple processes in cluster.
Comments
Post a Comment