atlas-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Hagelberg <jnhagelb...@us.ibm.com>
Subject Re: Review Request 56417: ATLAS-1535: Some webapp tests are failing due to a stale Titan transaction
Date Wed, 08 Feb 2017 22:29:36 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/56417/
-----------------------------------------------------------

(Updated Feb. 8, 2017, 10:29 p.m.)


Review request for atlas and David Kantor.


Bugs: ATLAS-1535
    https://issues.apache.org/jira/browse/ATLAS-1535


Repository: atlas


Description (updated)
-------

When debugging some of the test failures in webapp, I found that many are occurring when a
http request runs in the context of a stale Titan transaction. There is logic in BaseService
to rollback the transaction associated with a thread whenever a new request comes in. However,
this logic is not used in all places.  

This changes add logic to fix this.  I've added a new filter to consistently clean up stale
transactions when processing http requests.  I removed the old logic, which was only used
by two service classes.  The new filter is applied for every http request that comes in, so
the transaction used during request processing will never be stale now.


Diffs
-----

  webapp/src/main/java/org/apache/atlas/web/filters/StaleTransactionCleanupFilter.java PRE-CREATION

  webapp/src/main/java/org/apache/atlas/web/listeners/GuiceServletConfig.java d0437fc54087e6803ead83af59b85e9f6df333ad

  webapp/src/main/java/org/apache/atlas/web/resources/BaseService.java fb77b11e04c875a3d443dfb49be50cb818bed441

  webapp/src/test/java/org/apache/atlas/web/resources/TaxonomyServiceTest.java e1734e465ad553d95735b466f4dfe0fa8ad061b8


Diff: https://reviews.apache.org/r/56417/diff/


Testing
-------

Ran webapp tests.  Now, we're only left with the following failures:

QuickStartIT.runQuickStart:44 » AtlasService Metadata service API org.apache.a...
QuickStartV2IT.runQuickStart:47 » AtlasService Metadata service API org.apache...
NotificationHookConsumerIT.testUpdatePartialUpdatingQualifiedName:170 expected:<0> but
was:<1>

Previously, there were a number of other tests that were failing sporatically with a NullPointerException
coming from Titan.  These changes fix that.


Thanks,

Jeff Hagelberg


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message