1. 22 Jan, 2025 2 commits
  2. 21 Jan, 2025 1 commit
  3. 20 Jan, 2025 1 commit
    • Julien Muchembled's avatar
      storage: fix potential crash when connection fails during replication · 6aa46516
      Julien Muchembled authored
      This fixes a regression introduced in commit
      4c3b6c4d:
      
        Traceback (most recent call last):
          File "neo/storage/app.py", line 196, in run
            self._run()
          File "neo/storage/app.py", line 228, in _run
            self.doOperation()
          File "neo/storage/app.py", line 305, in doOperation
            poll()
          File "neo/storage/app.py", line 147, in _poll
            self.em.poll(1)
          File "neo/lib/event.py", line 186, in poll
            self._poll(blocking)
          File "neo/lib/event.py", line 269, in _poll
            if conn.readable():
          File "neo/lib/connection.py", line 499, in readable
            self._closure()
          File "neo/lib/connection.py", line 557, in _closure
            self.close()
          File "neo/lib/connection.py", line 546, in close
            handler.connectionFailed(self)
          File "neo/storage/handlers/storage.py", line 67, in connectionFailed
            self.app.replicator.abort()
          File "neo/storage/replicator.py", line 460, in abort
            self._nextPartition()
          File "neo/storage/replicator.py", line 349, in _nextPartition
            self.fetchTransactions()
          File "neo/storage/replicator.py", line 395, in fetchTransactions
            FETCH_COUNT, offset)
          File "neo/storage/database/mysql.py", line 1009, in getReplicationTIDList
            '' if length is None else ' LIMIT %s' % length))
          File "neo/storage/database/mysql.py", line 89, in wrapper
            return wrapped(self, *args)
          File "neo/storage/database/mysql.py", line 224, in query
            assert self.lock._is_owned() or self.TEST_IDENT == thread.get_ident()
        AssertionError
      6aa46516
  4. 15 Jan, 2025 1 commit
    • Julien Muchembled's avatar
      Fix IStorage.iterator potentially skipping recent transactions · 1578ad9f
      Julien Muchembled authored
      This fixes a critical bug in the storage node that ignored read locks,
      so transactions that have just been committed could be missing in the
      results.
      
      Because read locks are released by order of tid, a single storage node
      never returned a list with holes (i.e. the missing transactions could
      only be the last ones). However, holes could happen when merging
      results from multiple storage nodes.
      
      The change in the client node avoids extra RPC at the end:
      it should speed up in most cases and it makes the new test clearer.
      1578ad9f
  5. 16 Dec, 2024 1 commit
    • Xavier Thompson's avatar
      master: add --backup to initialize in BACKINGUP · 13ef5f15
      Xavier Thompson authored
      This applies only to an empty cluster and makes the cluster transition
      from the initial state RECOVERING to BACKINGUP without passing through
      state RUNNING:
      
      (empty) -> RECOVERING -> VERIFYING -> STARTING_BACKUP -> BACKINGUP
      
      This is the only way to reach BACKINGUP without having to pass through
      RUNNING first and manually transitioning to STARTING_BACKUP. It is the
      only way to reach state BACKINGUP fully automatically.
      
      See merge request !25
      13ef5f15
  6. 21 Jul, 2024 8 commits
  7. 20 Jul, 2024 1 commit
    • Vincent Pelletier's avatar
      neoctl: Change the expected tid-or-timestamp format · 773bfa97
      Vincent Pelletier authored
      Before this change, the only distinction between a timestamp and a TID was
      the presence of the decimal separator, ".". As a result, a timestamp
      mistakenly provided without a decimal separator would be interpreted as a
      TID, which will be somewhere in January 1900 (as TIDs are 64bits with much
      finer accuracy than timestamps). When used to truncate a database, and in
      the absence of sanity checks, this would simply wipe the database.
      
      So, instead of just relying on a decimal separator, require a longer
      string. Make it a prefix for readability. Also, TIDs are more niche than
      timestamp, require them to have a mark, and do not require anything from
      timestamps.
      773bfa97
  8. 08 Jul, 2024 2 commits
  9. 21 May, 2024 1 commit
  10. 17 May, 2024 1 commit
  11. 09 May, 2024 4 commits
  12. 16 Apr, 2024 1 commit
  13. 22 Mar, 2024 6 commits
  14. 22 Feb, 2024 8 commits
  15. 18 Dec, 2023 2 commits
    • Kirill Smelkov's avatar
      client: Don't allow oPtion_nAme in zurl · 798c9f25
      Kirill Smelkov authored
      Julien notes this is very likely unneeded:
      !21 (diffs, comment 195929)
      
      We had it like this since 01a01c8c (client: Add support for zodburi),
      but I rechecked zodburi codebase now and it does not do any similar
      lowering anywhere.
      
      So drop support for case normalization in zurl options.
      
      /cc @levin.zimmermann
      /reviewed-by @jm
      /reviewed-on !21
      798c9f25
    • Kirill Smelkov's avatar
      app: Remember SSL credentials so that it is possible to retrieve them · 17af7f27
      Kirill Smelkov authored
      Unfortunately after creating SSL context it is not possible, or at least
      I could not find how, to retrieve original credentials with which the
      context was created. However wendelin.core needs to be able to take a
      client storage, reconstruct zurl to refer to that particular storage,
      and pass that zurl to wcfs, so that wcfs, in turn, could access the same
      ZODB database.
      
      Given a NEO client instance, it is already possible to retrieve
      master_nodes, cluster name, and detect whether SSL is being in use.
      However without being able to retrieve original SSL credentials,
      reconstructed zurl will not be full and wcfs won't be able to use
      exactly the same secrets as python part does.
      
      -> Help wendelin.core by remembering which ca/cert/key were used to
      build SSL context.
      
      This information is used by zstor_2zurl in wendelin.core here:
      
      https://lab.nexedi.com/nexedi/wendelin.core/blob/885b3556/lib/zodb.py#L390-418
      
      /cc @levin.zimmermann
      /reviewed-by @jm
      /reviewed-on !21
      17af7f27