Skip to content
Snippets Groups Projects
  1. Apr 21, 2025
  2. Apr 18, 2025
  3. Apr 17, 2025
  4. Apr 16, 2025
    • Кирилл Безуглый's avatar
      fix(sql): alter table add column defaults to null · 9da55028
      Кирилл Безуглый authored and Dmitry Ivanov's avatar Dmitry Ivanov committed
      `ALTER TABLE ADD COLUMN` is now nullable by default, unless otherwise
      specified explicitly. This is default behavior in PostgreSQL and MySQL,
      and we want to be in line with industry standards. Also, nullability as
      a default behavior works better with concurrent DML (less constraints).
      
      Closes #1696.
      9da55028
    • Кирилл Безуглый's avatar
      fix(sql): clarify existence clause and support mixed actions in ALTER TABLE · 242687cc
      Кирилл Безуглый authored and Dmitry Ivanov's avatar Dmitry Ivanov committed
      This commit addresses two issues in ALTER TABLE handling:
      
      1. Lack of explicit `IF [NOT] EXISTS` for each action, leading to ambiguity.
      2. Incorrect assumption that all subsequent actions are identical to the first,
         preventing mixed-action ALTER TABLE statements as supported by PostgreSQL.
      
      Now, each action explicitly tracks its own existence clause, and the parser
      supports multiple distinct actions in a single ALTER TABLE statement.
      
      Closes #1617.
      242687cc
    • Diana Tikhonova's avatar
      chore: update merge request template · a2346c4c
      Diana Tikhonova authored and Dmitry Rodionov's avatar Dmitry Rodionov committed
      a2346c4c
    • Artem Shmelev's avatar
      fix: fix bug in replicaset master switchover · 4f66ad5b
      Artem Shmelev authored
      Using the test test_joining.py::test_replication as an example, I’ll break down what’s happening.
      Test logic: 2 instances, i1 and i2. i1 is the master of the replicaset, and i2 is promoted to Raft leader. Then we restart i1 and check that the replication settings have been delivered to i1.
      
      Governor steps on i2 for this test:
      	1.	update instance state to offline
      	2.	update target replication leader
      	3.	configure replication
      	4.	transfer replication leader
      	5.	configure replication
      	6.	update current sharding configuration
      	7.	update instance state to online
      
      The problem occurs when governor i2 performs step 5, and i1 starts up and sends an update_request from postjoin.
      
      Here’s what happens in detail:
      	•	At step 5, the governor performs a CAS (compare-and-swap) to update the current_config_version of the replicaset (to make it equal to target_config_version) and waits for the operation’s index to be applied (in the test example, this operation has index=38, while commit_index=37).
      	•	At this moment, an rpc update_instance arrives at i2, and a CAS is done to change the state to Online (index=39, commit_index=37), and we also wait for this operation’s index to be applied.
      	•	At the moment we calculate the ops for CAS inside update_instance, commit_index=37, and we don’t see the change to current_config_version with index=38, so we assume that the bump of the replicaset config version has already been done (the versions already differ), and we don’t change this version in the ops (we only change target_state=Online).
      	•	Commits and applies for indices 38 and 39 happen, both instances are online, replication is only configured for i2. current_config_version == target_config_version, so the governor doesn’t trigger a retry for replication setup.
      
      My fix removes the conditions for bumping the config versions of replicaset and vshard from update_instance, and the test stops being flaky.
      
      My fix additionally removes the conditions for bumping the config version from other locations, because they are unnecessary too.
      4f66ad5b
    • Kurdakov Alexander's avatar
      fix: picodata status format · c8d9e177
      Kurdakov Alexander authored
      For instance name with length < 4 column
      name was trimmed.
      c8d9e177
    • Kurdakov Alexander's avatar
      refactor: remove extra panic in apply_parameter · ce676d7d
      Kurdakov Alexander authored and Alexander Kurdakov's avatar Alexander Kurdakov committed
      No matter how cool the value validation is,
      a bad value may one day pass and break cluster, but
      it's just a dynamic configuration.
      ce676d7d
    • Kurdakov Alexander's avatar
      fix: waiting for DdlCommit is almost reliable · 333d2b22
      Kurdakov Alexander authored and Alexander Kurdakov's avatar Alexander Kurdakov committed
      333d2b22
  5. Apr 15, 2025
  6. Apr 14, 2025
  7. Apr 11, 2025
  8. Apr 10, 2025
Loading