Commit Graph

224 Commits

Author SHA1 Message Date
Radim Vansa 1ecc926fa1 HHH-11350 Intermittent failure in EntityCollectionInvalidationTest.testAll
(cherry picked from commit 20daac6ea7)
2017-07-19 13:43:09 -07:00
Radim Vansa 8ca291fe20 HHH-11350 Intermittent failure in testEvictAll/testRemoveAll
(cherry picked from commit 2a4efd46ca)
2017-07-19 13:43:09 -07:00
Radim Vansa f2f4c1a954 HHH-11339 Use UnorderedDistributionInterceptor for async replication
(cherry picked from commit f59807554a)
2017-07-19 13:43:09 -07:00
Radim Vansa 7cf3d2e527 HHH-11323 + HHH-11339
Evict during concurrent update and putFromLoad can result in stale entry in 2LC
PutFromLoads in replicated/distributed caches should propagate asynchronously

It would require additional effort to isolate only changes that fix
HHH-11323 and which just allow async propagation.

(cherry picked from commit 160f5ba863)
2017-07-19 13:43:09 -07:00
Radim Vansa 7b355c8037 HHH-11323 Update CorrectnessTestCase
(cherry picked from commit ba3677b690)
2017-07-19 13:43:09 -07:00
Radim Vansa 40e62aac7b HHH-11320 Disable testContestedPutFromLoad because of short timeout
(cherry picked from commit f4f50aa5c8)
2017-07-19 13:43:09 -07:00
Gail Badner be0a781f01 HHH-11202 : IllegalAccessException on Embeddable ID after serializing Getter in cache key
(cherry picked from commit 99a033c21c)
2017-01-12 09:37:44 -08:00
Radim Vansa 97fb511083 HHH-11304 Replace PutFromLoadValidator properly in CollectionRegionAccessStrategyTest
(cherry picked from commit c94df359d6)

Conflicts:
	hibernate-infinispan/src/test/java/org/hibernate/test/cache/infinispan/collection/CollectionRegionAccessStrategyTest.java
2017-01-05 15:21:54 -08:00
Radim Vansa 560d6b59c6 HHH-11304 Invalidations are not cleared when transaction rolls back
* always use global transaction id (in transactional caches) or command invocation id (in non-transactional caches) to identifiy the invalidator
* don't use afterInvoke/afterUpdate/unlockItem to end invalidation as this is not called during rollback
** use Infinispan transaction handling or explicitly registered invalidation to hook into the process
** move invalidation calls to interceptor stack where we have the identifiers
* don't use deprecated methods for commands marshalling

(cherry picked from commit 294ba74c76)

Conflicts:
	hibernate-infinispan/src/main/java/org/hibernate/cache/infinispan/access/InvalidationCacheAccessDelegate.java
	hibernate-infinispan/src/main/java/org/hibernate/cache/infinispan/access/NonTxInvalidationCacheAccessDelegate.java
	hibernate-infinispan/src/main/java/org/hibernate/cache/infinispan/access/NonTxPutFromLoadInterceptor.java
	hibernate-infinispan/src/main/java/org/hibernate/cache/infinispan/access/PutFromLoadValidator.java
	hibernate-infinispan/src/main/java/org/hibernate/cache/infinispan/access/TxInvalidationCacheAccessDelegate.java
	hibernate-infinispan/src/main/java/org/hibernate/cache/infinispan/util/EndInvalidationCommand.java
	hibernate-infinispan/src/test/java/org/hibernate/test/cache/infinispan/functional/InvalidationTest.java
2017-01-05 15:01:10 -08:00
Gail Badner 6729643e63 HHH-11083 : Change references to "OldCacheKeyImplementation" to "CacheKeyImplementation" in MultTenancyTest; also override addSettings to use DefaultCacheKeysFactory
(cherry picked from commit 30974c1cd4)
2016-11-22 23:33:51 -08:00
Gail Badner 68536a4d6d HHH-11083 : Change references to "OldCacheKeyImplementation" to "CacheKeyImplementation" in CacheKeysFactoryTest
(cherry picked from commit 61ca5c220b)
2016-11-22 23:33:29 -08:00
Radim Vansa f744f89bd3 HHH-11083 WrongClassException using Infinispan and sharing cache regions
* DefaultCacheKeysFactory implements CacheKeysFactory, therefore it can be used in hibernate.cache.keys_factory
* Use DefaultCacheKeysFactory by default
* Add "default" and "simple" as short names for those factories
2016-11-22 23:32:44 -08:00
Radim Vansa 3e164382c1 HHH-11267 Fix SessionRefreshTest
* Refactor common code from NonTx- and TxInvalidationInterceptor to common base
2016-11-22 13:28:27 -08:00
Radim Vansa 247e6085a4 HHH-11268 Upgrade Infinispan to version 8.2.5 2016-11-22 13:28:27 -08:00
Radim Vansa fe3957df0c HHH-11226 Hibernate cache throws NullPointerException during wildfly app server startup 2016-11-22 12:42:41 -08:00
Paul Ferraro 79ff7aec5b HHH-11254 Timestamps cache fails validation if eviction strategy = MANUAL 2016-11-22 12:25:12 -08:00
Sanne Grinovero eb73985c9e HHH-11271 Fix hidden failure in InfinispanRegionFactoryTestCase#testTimestampValidation
(cherry picked from commit c308bcbe7d)
2016-11-22 11:12:08 -08:00
Gail Badner 81ffaacf09 HHH-10287 - Made necessary changes to backport 2016-06-07 12:00:43 -07:00
Steve Ebersole 6667020808 HHH-10287 - Cache keys no longer include the entity type
(cherry picked from commit 3a0824a037)

Conflicts:
	hibernate-core/src/main/java/org/hibernate/cfg/AvailableSettings.java
	hibernate-testing/src/main/java/org/hibernate/testing/cache/BaseNaturalIdRegionAccessStrategy.java
	hibernate-testing/src/main/java/org/hibernate/testing/cache/ReadWriteNaturalIdRegionAccessStrategy.java
2016-06-07 12:00:43 -07:00
Vlad Mihalcea 0ed39c7746 Change hibernate.properties to take configurable environment settings 2016-03-16 09:30:29 +02:00
Paul Ferraro 58c6c7a98a HHH-10546 InfinispanRegionFactory should stop any caches it starts 2016-03-01 13:42:34 -08:00
Paul Ferraro b03947e4a5 HHH-10545 InfinispanRegionFactory inadvertently starts the default cache during stop() 2016-03-01 13:42:34 -08:00
Radim Vansa eeb0324c06 HHH-9839 Use JBoss Logger interface to allow internationalization of error messages 2016-01-26 10:52:46 -06:00
Radim Vansa ff638af2e3 HHH-10450 Refactor the way configuration is read
* infinispan-config.xml or infinispan-config-local.xml keeps defaults for all caches
2016-01-26 10:52:46 -06:00
Radim Vansa 9584a7b060 HHH-10272 Make pending-puts cache template configurable
* also set pending-puts cache to use simple cache
2016-01-26 10:52:46 -06:00
Paul Ferraro 3aef8de87d HHH-10416 Drop superfluous immutable-entity cache configuration. Default to entity cache configuration if undefined. 2016-01-12 17:47:13 -06:00
Steve Ebersole b1d1a3c143 HHH-10307 - JTA no longer transitively provided (HHH-10178) causes problems for apps not using JTA 2016-01-08 11:12:58 -06:00
Galder Zamarreño 05aaeb1963 HHH-10344 Make transactional invalidation backwards compatible 2015-12-16 12:15:57 -06:00
Sanne Grinovero 4acd4bff8e HHH-10379 Remove dependency to rhq-pluginAnnotations 2015-12-15 16:53:44 +00:00
Galder Zamarreño 2eba53acf5 HHH-10306 Add missing license header 2015-11-27 13:24:31 +01:00
Galder Zamarreño fe058e4ef7 HHH-10306 Plug Externalizers via module initializer 2015-11-27 09:51:09 +01:00
Steve Ebersole 4793ca30a2 HHH-10178 - Move Geronimo JTA jar to provided configuration (non-transitive) 2015-11-17 10:21:58 -06:00
Radim Vansa 9372803718 HHH-10215 Upgrade to Infinispan 8.0 2015-11-13 09:52:31 -06:00
Radim Vansa 71e13cdf25 HHH-10185 In nonstrict-read-write mode the remove may be not applied 2015-11-04 12:10:11 +01:00
Radim Vansa 43345754f5 HHH-10163 QueryResultsRegion is not invalidated from evictAll() 2015-11-02 09:37:01 +01:00
Steve Ebersole 9633c0a6e5 disable hibernate-infinispan tests on master 2015-10-03 15:01:51 -05:00
Radim Vansa d812f79ace HHH-10101 Implement nonstrict-read-write mode in Infinispan 2LC
* requires non-transactional cache in repl/dist/local mode and versioned entities
2015-09-21 16:33:35 +02:00
Radim Vansa 5edcf26a0a HHH-10083 Support replicated and distributed caches 2015-09-16 14:46:52 +02:00
Radim Vansa 3689924d74 HHH-10030 Add read-write cache concurrency strategy to Infinispan 2LC
* AccessType.READ_WRITE is now supported cache concurrency strategy
* Added checks that we're caching in local or invalidation cache (distributed and replicated cache does not work ATM)
* Refactored test-suite: Running on both transactional and read-write caches (these should yield the same results)
** CustomParemeterized runner is used for that
** Moved all entities used in functional tests to one package
** Removed already disabled tests related to class loaders (not needed since Infinispan 5.1)
2015-09-03 11:35:05 +02:00
Radim Vansa 64137c3619 HHH-10057 hibernate-infinispan incompatible with Infinispan 8.0.0.CR1
* ISPN-5609 changed InvalidateCommand constructors: used reflection to work around that; now should work with 8.0.0.CR1
* renamed BeginInvalidationCommand.getLockOwner to getSessionTransactionId() to prevent further conflicts
* added commands tests
2015-09-01 11:59:59 -05:00
Radim Vansa 2057bb3f1d HHH-10023 Make hibernate-infinispan compiled with Infinispan 7.x but runnable with Infinispan 8.x
* workaround for ISPN-5676
* fix for ClassCastException in ClusteredTimestampsRegionImpl
* minor fixes in the testsuite
2015-08-20 13:37:37 +02:00
Steve Ebersole 11b358305a HHH-10040 - Fix problem with incomplete Iterator impl 2015-08-19 12:21:57 -05:00
Radim Vansa 6191489ca3 HHH-9928 Pending put leaks when the entity is not found in DB 2015-08-12 10:55:49 +02:00
Radim Vansa 93d39fa470 HHH-9868, HHH-9881 Must not write into non-transactional caches during transactional write
* The write can only invalidate (remove) the entry and block further PFERs of that entry
* After successful DB update, if there have not been any concurrent updates the value can be PFERed into the cache
2015-08-12 10:39:22 +02:00
Radim Vansa 19c14cee9a HHH-9868, HHH-9881 Removed references to TransactionManager from PutFromLoadValidator
* Also removed put() instead of PFER() after region invalidation
* Relaxed test that required that session.load() after cache.evictAll() in the same transaction cached the loaded entity
2015-08-12 10:39:21 +02:00
Radim Vansa c8ed5e1bef HHH-9898 Test for correct behaviour of 2LC
* Test is marked as ignored since it is expected to run it only manually
2015-08-12 10:39:21 +02:00
Radim Vansa 984125e87e HHH-9868, HHH-9881 Replaced access to TransactionManager with Session 2015-08-12 10:39:20 +02:00
Radim Vansa 1f24fa6354 HHH-9868, HHH-9881 Implementation for non-transactional caches and non-JTA transactions. 2015-08-12 10:39:19 +02:00
Radim Vansa fa7265ff0e HHH-9881 Pending put needs to be invalidated on update on remote node
* This could lead to performance degradation since new EndInvalidatingCommand
  needs to be send after transaction is committed
2015-08-12 10:39:18 +02:00
Radim Vansa 4b2a78785e HHH-9868 Infinispan 2LC can store stale data
* invalidation blocks putFromLoads until the transaction with invalidation
  is committed
* rewritten the naked puts support: timestamp is stored in the pendingPutMap
  and removal of the record relies on pending puts' idle expiration or
  piggy-backs on release from putFromLoad
2015-08-12 10:39:18 +02:00