[JBoss JIRA] (ISPN-3393) Cannot build server after upgrading jboss-marshalling
by Pedro Ruivo (JIRA)
[ https://issues.jboss.org/browse/ISPN-3393?page=com.atlassian.jira.plugin.... ]
Pedro Ruivo updated ISPN-3393:
------------------------------
Fix Version/s: 6.0.0.Beta1
(was: 6.0.0.Alpha3)
> Cannot build server after upgrading jboss-marshalling
> -----------------------------------------------------
>
> Key: ISPN-3393
> URL: https://issues.jboss.org/browse/ISPN-3393
> Project: Infinispan
> Issue Type: Bug
> Components: Server
> Reporter: Martin Gencur
> Assignee: Tristan Tarrant
> Fix For: 6.0.0.Beta1
>
>
> The following error occurs when building the server distribution from snapshot:
> [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.0:compile (default-compile) on project infinispan-server-infinispan: Compilation failure: Compilation failure:
> [ERROR] /home/mgencur/infinispan/infinispan-server/infinispan/src/main/java/org/jboss/as/clustering/infinispan/io/ExternalizableExternalizer.java:[29,29] cannot find symbol
> [ERROR] symbol: class Creator
> [ERROR] location: package org.jboss.marshalling
> [ERROR] /home/mgencur/infinispan/infinispan-server/infinispan/src/main/java/org/jboss/as/clustering/infinispan/io/ExternalizableExternalizer.java:[30,37] cannot find symbol
> [ERROR] symbol: class ReflectiveCreator
> [ERROR] location: package org.jboss.marshalling.reflect
> [ERROR] /home/mgencur/infinispan/infinispan-server/infinispan/src/main/java/org/jboss/as/clustering/infinispan/io/ExternalizableExternalizer.java:[39,26] cannot find symbol
> [ERROR] symbol: class Creator
> [ERROR] location: class org.jboss.as.clustering.infinispan.io.ExternalizableExternalizer<T>
> [ERROR] /home/mgencur/infinispan/infinispan-server/infinispan/src/main/java/org/jboss/as/clustering/infinispan/io/ExternalizableExternalizer.java:[29,29] cannot find symbol
> [ERROR] symbol: class Creator
> [ERROR] location: package org.jboss.marshalling
> [ERROR] /home/mgencur/infinispan/infinispan-server/infinispan/src/main/java/org/jboss/as/clustering/infinispan/io/ExternalizableExternalizer.java:[30,37] cannot find symbol
> [ERROR] symbol: class ReflectiveCreator
> [ERROR] location: package org.jboss.marshalling.reflect
> [ERROR] /home/mgencur/infinispan/infinispan-server/infinispan/src/main/java/org/jboss/as/clustering/infinispan/io/ExternalizableExternalizer.java:[39,26] cannot find symbol
> [ERROR] symbol: class Creator
> [ERROR] location: class org.jboss.as.clustering.infinispan.io.ExternalizableExternalizer<T>
> [ERROR] /home/mgencur/infinispan/infinispan-server/infinispan/src/main/java/org/jboss/as/clustering/infinispan/io/ExternalizableExternalizer.java:[39,48] cannot find symbol
> [ERROR] symbol: class ReflectiveCreator
> [ERROR] location: class org.jboss.as.clustering.infinispan.io.ExternalizableExternalizer<T>
> [ERROR] -> [Help 1]
> E.g. the class Creator does not exist in jboss-marshalling 2.0.0.Beta1
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 7 months
[JBoss JIRA] (ISPN-3348) Unable to read entries from SingleFileCacheStore after server restart
by Pedro Ruivo (JIRA)
[ https://issues.jboss.org/browse/ISPN-3348?page=com.atlassian.jira.plugin.... ]
Pedro Ruivo updated ISPN-3348:
------------------------------
Fix Version/s: 6.0.0.Beta1
(was: 6.0.0.Alpha3)
> Unable to read entries from SingleFileCacheStore after server restart
> ---------------------------------------------------------------------
>
> Key: ISPN-3348
> URL: https://issues.jboss.org/browse/ISPN-3348
> Project: Infinispan
> Issue Type: Bug
> Components: Server
> Affects Versions: 6.0.0.Alpha1
> Reporter: Martin Gencur
> Assignee: Galder Zamarreño
> Priority: Critical
> Fix For: 6.0.0.Beta1
>
>
> Using the following configuration:
> {code:xml}
> <subsystem xmlns="urn:infinispan:server:core:5.3" default-cache-container="default">
> <cache-container name="default" default-cache="default" listener-executor="infinispan-listener" eviction-executor="infinispan-eviction" replication-queue-executor="infinispan-repl-queue">
> <local-cache name="default" start="EAGER">
> <locking isolation="NONE" acquire-timeout="30000" concurrency-level="1000" striping="false"/>
> <transaction mode="NONE"/>
> <store class="org.infinispan.loaders.file.SingleFileCacheStore" passivation="false" preload="false" purge="false">
> <property name="location">${java.io.tmpdir}/single-file-cache-store</property>
> <property name="maxEntries">2</property>
> </store>
> </local-cache>
> </cache-container>
> </subsystem>
> {code}
> ...it is not possible to retrieve the cache entry from the cache store after server restart, as demonstrated by the following test:
> {code:java}
> RemoteCache<String, String> rc = rcm.getCache();
> rc.clear();
> assertNull(rc.get("k1"));
> rc.put("k1", "v1");
> rc.put("k2", "v2");
> rc.put("k3", "v3");
> assertEquals("v1", rc.get("k1"));
> assertEquals("v2", rc.get("k2"));
> assertEquals("v3", rc.get("k3"));
> controller.kill(CONTAINER);
> controller.start(CONTAINER);
> assertEquals("v2", rc.get("k2"));
> //^^^fails here - unable to find k2
> assertEquals("v3", rc.get("k3"));
> assertNull(rc.get("k1")); //maxEntries was 2, this entry should be lost as the oldest entries are removed
> controller.stop(CONTAINER);
> {code}
> Note that preload is set to false for this test. When I set it to true, the test passes.
> I tried to modify BaseCacheStoreFunctionalTest#testPreloadAndExpiry, disable "preload" and retrieve the cache entries after server restart by calling cache.get() (not from DataContainer) and the test passed (I ran SingleFileCacheStoreFunctionalTest which extends BaseCacheStoreFunctionalTest). So it seems the bug is related to the server distribution.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 7 months
[JBoss JIRA] (ISPN-3419) Write Skew check must be performed only in the primary owner
by Pedro Ruivo (JIRA)
[ https://issues.jboss.org/browse/ISPN-3419?page=com.atlassian.jira.plugin.... ]
Pedro Ruivo updated ISPN-3419:
------------------------------
Fix Version/s: 6.0.0.Beta1
(was: 6.0.0.Alpha3)
> Write Skew check must be performed only in the primary owner
> ------------------------------------------------------------
>
> Key: ISPN-3419
> URL: https://issues.jboss.org/browse/ISPN-3419
> Project: Infinispan
> Issue Type: Bug
> Components: Transactions
> Affects Versions: 6.0.0.Alpha2
> Reporter: Pedro Ruivo
> Assignee: Pedro Ruivo
> Fix For: 6.0.0.Beta1
>
>
> The following case can create data inconsistency:
> A: txA reads k with version v1 and writes on k (say valueA)
> primary-owner of k: txA acquire lock on k, validates and return v2 (increment(v1))
> non-primary-onwer of k: txA registers a backup lock, validates and returns v2 (increment(v1))
> A: txA commits with version v2.
> primary-owner of k: applies txA //commit in the non-primary-owner is delayed
> B: txB remote reads k with version v2 and writes on k (say valueB) and prepare the transaction
> primary-owner of k: txB waits until the lock is relased.
> non-primary-onwer of k: txA registers a backup lock, validates and returns v2 (increment(v1), because it has not applied the txA)
> primary-owner of k: lock is release, txB is validated and it return v3 (increment(v2))
> B collects all the response and merge them. However, the map.value() can return first the response from primary-owner (v3) and them the response from the non-primary-owner (v2). The result version map will be k=>v2.
> txB will update k with the same previous version and a different value. from here the data will become inconsistent.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 7 months
[JBoss JIRA] (ISPN-3405) Entries are passivated with wrong ID in DB
by Pedro Ruivo (JIRA)
[ https://issues.jboss.org/browse/ISPN-3405?page=com.atlassian.jira.plugin.... ]
Pedro Ruivo updated ISPN-3405:
------------------------------
Fix Version/s: 6.0.0.Beta1
(was: 6.0.0.Alpha3)
> Entries are passivated with wrong ID in DB
> ------------------------------------------
>
> Key: ISPN-3405
> URL: https://issues.jboss.org/browse/ISPN-3405
> Project: Infinispan
> Issue Type: Bug
> Components: Eviction
> Affects Versions: 5.3.0.Final, 6.0.0.Alpha1
> Reporter: Vitalii Chepeliuk
> Assignee: Galder Zamarreño
> Fix For: 6.0.0.Beta1, 6.0.0.Final
>
>
> Entry passivation into DB, concretly this class LockSupportCacheStore and method store. Look at lines with "<<<" string for more info
> {code:title=LockSupportCacheStore.java|borderStyle=solid}
> @Override
> public final void store(InternalCacheEntry ed) throws CacheLoaderException {
> if (trace) {
> log.tracef("store(%s)", ed);
> }
> if (ed == null) {
> return;
> }
> if (ed.canExpire() && ed.isExpired(timeService.wallClockTime())) {
> if (containsKey(ed.getKey())) {
> if (trace) {
> log.tracef("Entry %s is expired! Removing!", ed);
> }
> remove(ed.getKey());
> } else {
> if (trace) {
> log.tracef("Entry %s is expired! Not doing anything.", ed);
> }
> }
> return;
> }
> L keyHashCode = getLockFromKey(ed.getKey()); <<< here key is generated like ed.getKey().hashCode() & 0xfffffc00;
> lockForWriting(keyHashCode);
> try {
> storeLockSafe(ed, keyHashCode); <<< here it should be stored into Bucket and then stored in DB
> } finally {
> unlock(keyHashCode);
> }
> if (trace) {
> log.tracef("exit store(%s)", ed);
> }
> }
> {code}
> When I use RemoteCacheManager and RemoteCache I am putting entries into cache
> {code:title=Test.java|borderStyle=solid}
> cache.put("key1", "v1");
> cache.put("key2", "v2");
> cache.put("key3", "v3");
> {code}
> Then 2 entries are passivated and stored in DB
> ||ID||DATA||TIMESTAMP||
> |183713792|0301fe032a01034c422b21033e286d7942657374506572736f6e616c4b657957686963684861734e657665724265656e426574746572420521033e02763203620003630000000000000002|-1|
> |23486464|0301fe032a01034c420721033e046b657931420521033e02763103620003630000000000000001|-1|
> IDs are generated from method above and
> {code:title=Test.java|borderStyle=solid}
> byte[] keyBytes = marshaller.objectToByteBuffer("key1"); <<< key is marshalled
> long keyID = ByteArrayEquivalence.INSTANCE.hashCode(keyBytes) & 0xfffffc00 //computation taken from BucketBasedCacheStore <<< this does not work for me
> {code}
> And next step I'd like to retrieve data from DB
> SELECT ID, DATA FROM JDBC_BINARY_DEFAULT WHERE ID=keyID
> But in method
> {code:title=BucketBasedCacheStore.java|borderStyle=solid}
> @Override
> public Integer getLockFromKey(Object key) {
> return key.hashCode() & 0xfffffc00; <<< here should be used Arrays.hashCode((byte[])key) & 0xfffffc00), if key is represented as byte array, or used ByteArrayEquivalence instead of simple byte array(byte[]) as argument
> }
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 7 months