1. 30 1月, 2014 6 次提交
    • A
      Merge pull request #1886 from tinwelint/2.0-fix-constraint-hanging · 64556abf
      Alistair Jones 提交于
      Discussed with @tinwelint. I had misunderstood the lucene APIs and this change looks sensible.
      64556abf
    • M
      Doesn't close IndexReader after verifying deferred constraints · 70a661a4
      Mattias Persson 提交于
      that should be up to the SearcherManager. Closing the IndexReader manually
      and then trying to release the searcher holding will fail and consecutive
      calls to SearcherManager#acquire will get stuck in busy-loop.
      
      This solves a problem that caused the index population phase to hang after
      the node scan was complete, when flipping to ONLINE state and there were
      one or more updates to apply before flipping. Having a constraint creation
      hang caused the schema write lock be held indefinitely.
      70a661a4
    • M
      Fixed a conflict resolution mistake · c7f0fc0c
      Mattias Persson 提交于
      effectively removing an (almost) duplicated line. Introduced by
      46c41198
      c7f0fc0c
    • C
      Merge pull request #1885 from digitalstain/1.9-merge · 0a67a64e
      Chris Gioran 提交于
      1.9 merge
      0a67a64e
    • C
      316604f4
    • C
      Merge branch '1.9-maint' · 46c41198
      Chris Gioran 提交于
      Conflicts:
      	community/kernel/src/main/java/org/neo4j/kernel/InternalAbstractGraphDatabase.java
      	community/kernel/src/main/java/org/neo4j/kernel/impl/transaction/TxLog.java
      	community/kernel/src/main/java/org/neo4j/kernel/impl/transaction/TxManager.java
      	community/kernel/src/main/java/org/neo4j/kernel/impl/transaction/xaframework/InterceptingXaLogicalLog.java
      	community/kernel/src/main/java/org/neo4j/kernel/impl/transaction/xaframework/XaFactory.java
      	community/kernel/src/main/java/org/neo4j/kernel/impl/transaction/xaframework/XaLogicalLog.java
      	community/kernel/src/main/java/org/neo4j/kernel/impl/transaction/xaframework/XaResourceManager.java
      	community/kernel/src/test/java/org/neo4j/kernel/impl/index/TestIndexCommand.java
      	community/kernel/src/test/java/org/neo4j/kernel/impl/nioneo/store/TestNeoStore.java
      	community/kernel/src/test/java/org/neo4j/kernel/impl/nioneo/store/TestXa.java
      	community/kernel/src/test/java/org/neo4j/kernel/impl/transaction/TestXaFramework.java
      	community/kernel/src/test/java/org/neo4j/kernel/impl/transaction/TxManagerTest.java
      	community/kernel/src/test/java/org/neo4j/kernel/impl/transaction/xaframework/TestStandaloneLogExtractor.java
      	community/kernel/src/test/java/org/neo4j/kernel/impl/transaction/xaframework/TestUpgradeOneDotFourToFiveIT.java
      	community/kernel/src/test/java/org/neo4j/kernel/impl/transaction/xaframework/XaLogicalLogTest.java
      	community/lucene-index/src/test/java/org/neo4j/index/impl/lucene/TestLuceneDataSource.java
      	community/lucene-index/src/test/java/org/neo4j/index/impl/lucene/TestRecovery.java
      	enterprise/backup/src/main/java/org/neo4j/backup/BackupServer.java
      	enterprise/backup/src/main/java/org/neo4j/backup/BackupService.java
      	enterprise/backup/src/main/java/org/neo4j/backup/RebuildFromLogs.java
      	enterprise/cluster/src/main/java/org/neo4j/cluster/protocol/atomicbroadcast/multipaxos/MultiPaxosContext.java
      	enterprise/com/src/main/java/org/neo4j/com/Client.java
      	enterprise/com/src/main/java/org/neo4j/com/Server.java
      	enterprise/com/src/test/java/org/neo4j/com/MadeUpClient.java
      	enterprise/com/src/test/java/org/neo4j/com/MadeUpServer.java
      	enterprise/com/src/test/java/org/neo4j/com/ServerTest.java
      	enterprise/ha/src/main/java/org/neo4j/kernel/ha/BranchDetectingTxVerifier.java
      	enterprise/ha/src/main/java/org/neo4j/kernel/ha/HaRequestType196.java
      	enterprise/ha/src/main/java/org/neo4j/kernel/ha/HighlyAvailableGraphDatabase.java
      	enterprise/ha/src/main/java/org/neo4j/kernel/ha/MasterClient196.java
      	enterprise/ha/src/main/java/org/neo4j/kernel/ha/cluster/zoo/ZooClient.java
      	enterprise/ha/src/main/java/org/neo4j/kernel/ha/com/master/MasterServer.java
      	enterprise/ha/src/main/java/org/neo4j/kernel/ha/com/slave/MasterClient153.java
      	enterprise/ha/src/main/java/org/neo4j/kernel/ha/com/slave/MasterClient17.java
      	enterprise/ha/src/main/java/org/neo4j/kernel/ha/com/slave/MasterClient18.java
      	enterprise/ha/src/main/java/org/neo4j/kernel/ha/com/slave/MasterClientResolver.java
      	enterprise/ha/src/main/java/org/neo4j/kernel/ha/com/slave/SlaveServer.java
      	enterprise/ha/src/test/java/org/neo4j/ha/TransactionConstraintsIT.java
      	enterprise/ha/src/test/java/org/neo4j/test/ha/ClusterManager.java
      46c41198
  2. 29 1月, 2014 19 次提交
    • C
      Merge pull request #1865 from digitalstain/monitoring · 4581acb4
      Chris Gioran 提交于
      Introduction of monitoring in the kernel and HA network operations 
      4581acb4
    • C
      Merge pull request #1880 from digitalstain/phase2timeoutRetryFix · b75fbb98
      Chris Gioran 提交于
      Fixes an issue with phase2Timeout on proposer state
      b75fbb98
    • C
      Adds testing for transaction event monitoring in HA clusters · ebb2a77a
      Chris Gioran 提交于
      Adds two tests that make use of TransactionMonitor to monitor transaction
       propagation in clusters. One test counts events by committing and pushing
       from both slaves and the master, while the other counts transactions
       pulled from slaves.
      ebb2a77a
    • C
      Introduces and uses TransactionMonitor · 54f4ddf7
      Chris Gioran 提交于
      Introduces TransactionMonitor to facilitate measurement of transaction
       events, current commits and commit entry injections.
      Adds support for that in XaResourceManager, tagged by datasource name.
      Introduces a sample counting implementation meant for testing,
       EideticTransactionMonitor.
      Introduces tests for basic functionality in kernel and lucene-index
      54f4ddf7
    • C
      Fixes issue with Monitor tags · b21641f0
      Chris Gioran 提交于
      TaggedMonitorListenerInvocationHandler was not getting the tags that
       it was created with. The result was that listeners added for specific tags
       would get called for all invocations of the observed interface regardless.
       This commit fixes the issue and adds a test for it.
      b21641f0
    • C
      Moves ByteCounterMonitor to o.n.k.monitoring package · 7ad26627
      Chris Gioran 提交于
      ByteCounterMonitor is generic enough so it does not have to be
       in o.n.k.i.t.xaframework anymore
      7ad26627
    • C
      Introduces monitoring in network HA operations · 8fe53d5e
      Chris Gioran 提交于
      BlockLogBuffer now updates a ByterCounterMonitor with the bytes it
       writes to the underlying buffer. This way all operations that
       serialize transactions to the network can be monitored.
      Master and Client instances now make use of that BlockLogBuffer
       for streaming results and transactions.
      Introduces a RequestMonitor which logs HA requests. It supports
       request context via a hashmap which can be set to contain various
       information about the request logged.
      Client and Server now update a RequestMonitor with requests sent
       and received, respectively.
      8fe53d5e
    • C
      Introduces usage of ByteCounterMonitor in XaLogicalLog operations · 88e49a20
      Chris Gioran 提交于
      LogExtractor now updates a ByteCounterMonitor with bytes read while
       extracting transaction entries from a log
      XaLogicalLog updates a ByterCounterMonitor when deserializing
       prepared transactions from disk for sending over the network
      XaLogicalLog now updates a ByteCounterMonitor when deserializing
       a transaction stream over the network
      88e49a20
    • C
      Removes support for HA protocols from versions 1.5.3 and 1.7 · 02ba0902
      Chris Gioran 提交于
      Ha protocols from versions 1.5.3 and 1.7 are no longer supported for
       rolling upgrades. Hence they are no longer necessary to be present
       in the codebase.
      02ba0902
    • C
      Renames LogBufferMonitor to ByteCounterMonitor · 6ce68199
      Chris Gioran 提交于
      It is clear after some usage that log buffer monitoring is really
       a case of counting bytes, functionality that needs to be replicated in
       other places as well. It makes sense therefore to have LogBufferMonitor
       strictly count bytes, rename it to ByterCounterMonitor and reuse it
       where necessary.
      6ce68199
    • C
      Introduces byte count monitoring in DirectMappedLogBuffer · 963fc371
      Chris Gioran 提交于
      Uses the Monitors functionality to add bytes written counting
       facilities to DirectMappedLogBuffer. Achieved via introducing
       a LogBufferMonitor interface that is used by DMLB.
      XaLogicalLog and TxLog require access to Monitors to
       create the proper monitor and pass it to their DMLB.
      963fc371
    • C
      Removes LogBufferFactory and its default implementation · 91726de6
      Chris Gioran 提交于
      There was only one implementation of LogBufferFactory which
       was a straightforward call to DMLB constructor. This did
       not call for the need for a factory abstraction and since
       it was complicating upcoming work on monitoring it has now
       been removed.
      91726de6
    • A
      Merge pull request #1882 from systay/1876 · b53c6e4d
      Andres Taylor 提交于
      Fixes #1876
      b53c6e4d
    • M
      Merge pull request #1881 from chrisvest/duplicate-number-index-fix · 462917e7
      magnusvejlstrup 提交于
      Also fix false index collisions for online indexes
      462917e7
    • A
      8264f4e5
    • M
      bb75384f
    • A
    • C
      Also fix false index collisions for online indexes · b27b29f3
      Chris Vest 提交于
      The story so far:
      
      * Indexes store all numbers as doubles, and that means that large long values
        can coerce to the same double values and cause collisions in the index.
        We fixed this for indexes that are populating, by making them read colliding
        values out from the property store to double check if the collision is real
        or not.
      * We also added a similar "exact match" filtering to the index lookup
        operations on StateHandlingStatementOperations, to fix index lookups.
      * What we didn't fix in the first round, was adding new stuff to indexes that
        are online. This is the bug that Mattias found.
      * Specifically, the UniquePropertyIndexUpdater verifies that the constraint is
        still holding in its close method.
      * This is super bad, because the close method is called in commit - not in
        prepare, not during the transaction - in commit. Huge no-no.
      * Initially you'd think that this puts recovery at risk, but that turns out not
        to be the case, because during recovery, we use a normal index updater
        instead of the unique one.
      * So this means that the following scenario was possible: Add two nodes with
        similar but distinct long values to the index. The
        ConstraintEnforcingEntityOperations is fine with this because the values are
        really different. However, the UniquePropertyIndexUpdater trashes the
        transaction in commit. Now suppose the entire database server crashes for
        whatever reason, and we must do recovery. We recover the index using the
        normal updater that just adds the values without checking any constraints.
        And this is actually totally fine, because we filter for exact matches in the
        StateHandlingStatementOperations. And so only then does the index work as
        advertised. We had to crash the database in order to add a valid value to the
        index. Except, there is a window between the crash of the transaction, and
        the crash of the database, where the transaction could have been retried with
        the same exact value and encounter the same exact crash. Now we recover both
        transactions, and boom: we got a duplicate in the unique index!
      * The solution I'm going for currently is to just not verify the constraint in
        the UniquePropertyIndexUpdater.close method... just accept the value as
        given, and trust that the ConstraintEnforcingEntityOperations has done it's
        job.
      * Implementing this solution is made a bit harder by a number of tests
        operating directly with the IndexUpdaters, instead of checking the publicly
        observable behaviour.
      * I intend to rephrase these tests in terms of higher level APIs, but in the
        mean time (because there are a lot of cases to cover) we will have to ignore
        all the now failing tests, and see what the robustness suite says.
      b27b29f3
    • C
      Fixes an issue with phase2Timeout on proposer state · 1fb43107
      Chris Gioran 提交于
      When an instance times out on phase 2, if it is closed or delivered
       it should have its payload retried. This patch adds this functionality.
      1fb43107
  3. 28 1月, 2014 11 次提交
  4. 27 1月, 2014 4 次提交