Binary store in replicated mode
jessie_jie_xie Dec 1, 2015 4:34 AMHi Guys,
I am setting-up a ModeShape (4.5.0) environment adopting infinispan replicated mode (2 nodes).
After uploading files, I can find RepositoryData.dat under both
C:\modeshape\Repository\node1\binaries\data and C:\modeshape\Repository\node2\binaries\data with the same file size.
So, the binary files are successfully synchronized.
But at the same time, a table named "ispn_string_table_repositorydata" was created under msnode database, which is shared between two nodes and holds the table ispn_string_table_repository for structure data. And the data size/record count in ispn_string_table_repositorydata will increase along with the new uploaded files.
I am just confused that which binary store will be used in this case? From ispn_string_table_repositorydata or C:\modeshape\Repository\node[n]\binaries\data?
Actually in this case, individual binary storage in different locations is preferred than the centralized shared binary storage.
Would you please take some time to review my modeshape and infinispan configuration below?
Any advice/suggestion?
Many Thanks,
Jessie
{
"name" : "Repository",
"jndiName": null,
"transactionMode" : "auto",
"monitoring" : {
"enabled" : true,
},
"workspaces" : {
"predefined" : ["EA"],
"default" : "default",
"allowCreation" : true,
},
"storage" : {
"cacheName" : "Repository",
"cacheConfiguration" : "infinispan_configuration.xml",
"binaryStorage" : {
"minimumBinarySizeInBytes" : 4096,
"minimumStringSize" : 4096,
"type" : "cache",
"dataCacheName" : "RepositoryData",
"metadataCacheName" : "RepositoryMetadata"
}
},
...
}
======================================================================================
<?xml version="1.0" encoding="UTF-8"?>
<infinispan xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:infinispan:config:7.2 http://www.infinispan.org/schemas/infinispan-config-7.2.xsd"
xmlns="urn:infinispan:config:7.2">
<jgroups>
<stack-file name="ModeShape" path="default-configs/default-jgroups-tcp.xml"/>
</jgroups>
<cache-container default-cache="Repository">
<transport stack="ModeShape" node-name="jetty"/>
<jmx duplicate-domains="true"/>
<replicated-cache name="Repository" mode="ASYNC" queue-flush-interval="100">
<transaction mode="NON_XA" locking="PESSIMISTIC"/>
<persistence passivation="false">
<string-keyed-jdbc-store xmlns="urn:infinispan:config:store:jdbc:7.2"
fetch-state="false"
shared="true"
preload="false"
purge="false">
<connection-pool driver="com.mysql.jdbc.Driver"
connection-url="jdbc:mysql://localhost:3306/msnode?useUnicode=true&amp;characterEncoding=UTF-8"
username="root"
password="root"/>
<string-keyed-table drop-on-exit="false" create-on-start="true" prefix="ISPN_STRING_TABLE">
<id-column name="ID_COLUMN" type="VARCHAR(255)" />
<data-column name="DATA_COLUMN" type="LONGBLOB" />
<timestamp-column name="TIMESTAMP_COLUMN" type="BIGINT" />
</string-keyed-table>
</string-keyed-jdbc-store>
</persistence>
</replicated-cache>
<replicated-cache name="RepositoryData" mode="ASYNC" queue-flush-interval="100">
<transaction mode="NON_XA" locking="PESSIMISTIC"/>
<persistence passivation="false">
<file-store fetch-state="true"
shared="false"
preload="false"
purge="false"
path="C:\modeshape\Repository\node1\binaries\data"/>
</persistence>
</replicated-cache>
<replicated-cache name="RepositoryMetadata" mode="ASYNC" queue-flush-interval="100">
<transaction mode="NON_XA" locking="PESSIMISTIC"/>
<persistence passivation="false">
<file-store fetch-state="true"
shared="false"
preload="false"
purge="false"
path="C:\modeshape\Repository\node1\binaries\metadata"/>
</persistence>
</replicated-cache>
</cache-container>
</infinispan>