Skip to content
Snippets Groups Projects
  1. Jan 27, 2025
  2. Jan 16, 2025
  3. Jan 15, 2025
  4. Jan 14, 2025
    • Maksim Kaitmazian's avatar
      fix: avoid no such user error when the user is dropped during DROP USER IF EXISTS execution · 12edc947
      Maksim Kaitmazian authored and Maksim Kaitmazian's avatar Maksim Kaitmazian committed
      Here is how DROP USER IF EXISTS query can result in such error:
      
      - [client 1]: check user exists
      - [client 1]: send CAS request 1
      - [client 2]: check user exists
      - [client 2]: send CAS request 2
      - [leader]: recv CAS request 1 -> access_check: ok -> check predicate: ok -> apply(async)
      - [leader]: recv CAS request 2 -> access_check: no such user
                                     /|\
                                      |
                                      |
                                   applied
      
      To address such errors, access_check was made to not return errors when
      trying to drop non-existent users or roles.
      
      Now the above example is handled as follows:
      When a user is dropped during handling the request, it causes a schema change
      that leads to the rejection of the operation on the predicate check.
      Upon retry, the initiator will detect that the user has been dropped
      and handle it accordingly.
      12edc947
  5. Jan 13, 2025
  6. Jan 10, 2025
  7. Jan 09, 2025
  8. Dec 28, 2024
  9. Dec 27, 2024
    • Maksim Kaitmazian's avatar
      refactor: allow default ports to be listened on by other protocols · 30558fa0
      Maksim Kaitmazian authored and Dmitry Rodionov's avatar Dmitry Rodionov committed
      Previously, using a default port of another protocol would result in an
      error like the following
      ```
      error: Invalid value "localhost:8080" for '--pg-listen <[HOST][:PORT]>': PGPROTO cannot listen on port 8080 because it is default port for HTTP
      ```
      
      This commit allows default ports to be used by other protocols,
      as long as the port is not already occupied.
      
      Close #1254
      30558fa0
    • Georgy Moshkin's avatar
      fix: bug in conf_test when demoting excess voters · 08a9d0a8
      Georgy Moshkin authored
      The bug was introduced when I changed the behaviour of conf_change in
      regard to instances with target_state Expelled. As a result we would
      sometimes arbitrarily demote healthy voters in presence of degenerate
      ones.
      
      For example we could have this situation:
      
      instance i1: raft_id=1, target_state=Online, raft_configuration=voter
      instance i2: raft_id=2, target_state=Expelled, raft_configuration=voter (!)
      instance i3: raft_id=3, target_state=Offline, raft_configuration=voter (!)
      instance i4: raft_id=4, target_state=Online, raft_configuration=learner (!)
      instance i5: raft_id=5, target_state=Online, raft_configuration=learner (!)
      08a9d0a8
    • Georgy Moshkin's avatar
    • Кирилл Безуглый's avatar
      feat(pgproto)!: enable pgproto by default · 8f7f68c1
      Кирилл Безуглый authored
      BREAKING CHANGE: as soon as PostgreSQL protocol
      is enabled by default, we must be careful with
      `--pg-listen` cli flag when creating more than
      a single instance, because we will suddenly get
      a port confict error (busy port)
      Verified
      8f7f68c1
  10. Dec 25, 2024
    • Dmitry Rodionov's avatar
      fix: null was used instead of nil in proc sharding lua snippet · 5fe74577
      Dmitry Rodionov authored
      I found this by compiling tarantool with CMAKE_BUILD_TYPE=Debug
      5fe74577
    • Georgy Moshkin's avatar
      refactor: assert index is <= applied in compact_log instead of truncating · 0957624d
      Georgy Moshkin authored
      We used to automatically truncate the index in compact_log if the caller
      requested to compact too many entries. This made it so that the
      requirement of not compacting any un-applied entries was implicit in our
      code base, which is not good as it allows for some bugs to creep in
      (like the one we fix a couple commits ago).
      
      Now this is changed and instead of silently adjusting the index of last
      compacted entry, we just assert that it's no greater than the applied
      index. As a consequence there's a minor improvement in do_raft_log_auto_compaction
      function.
      0957624d
    • Georgy Moshkin's avatar
      fix: bug in raft snapshot application · e7c8582d
      Georgy Moshkin authored
      There was a hard-to-reproduce bug in our snapshot application code.
      We always compact the raft log before applying the snapshot, because
      the snapshot replaces the entries and some of the logic in raft-rs
      seems to rely on this. The problem was, that our compact_log function
      would not remove any unapplied entries, which makes sense for compaction
      triggered automatically by raft log size, but doesn't make sense for
      raft snapshot, as the snapshot contains the state corresponding to the
      newer entries. The fix is simple: don't guard from unapplied entry
      compaction in case the compaction is for raft snapshot.
      
      We don't add any regression tests for this, because the implementation
      would be too difficult and would need us to pollute the code with error
      injection logic, which is not a worthy trade off in this case. But also
      the logic will still be tested, because this bug was responsible for a
      large amount of flaky tests, so we should see a significant reduction in
      flakiness from now on in tests concerning raft snapshots.
      e7c8582d
  11. Dec 20, 2024
  12. Dec 19, 2024
  13. Dec 17, 2024
Loading