+
Skip to content

0.1.34

Latest
Compare
Choose a tag to compare
@Serpentian Serpentian released this 17 Jun 12:49
· 6 commits to master since this release

Date: 17-06-2025

Tag: 0.1.34

Compatibility

VShard 0.1.34 is almost fully compatible with previous VShard versions. Hot-reloading from an older version to 0.1.34 works. However, hot-reloading from 0.1.34 or later to a version earlier than 0.1.34 does not work and requires additional steps. Either the following code must be executed before the hot-reload, or a restart should be performed:

Before hot-reload from new to old on router

local function worker_cancel(module)
    local worker = module.worker
    if worker ~= nil and worker.fiber ~= nil then
        pcall(worker.fiber.cancel, worker.fiber)
    end
end

local function replicaset_workers_cancel_all(replicasets)
    for _, rs in pairs(replicasets) do
        worker_cancel(rs)
        for _, r in pairs(rs.replicas) do
            worker_cancel(r)
        end
    end
end

-- Execute on routers before reload:
for _, router in pairs(vshard.router.internal.routers) do
    replicaset_workers_cancel_all(router.replicasets)
end

-- Now hot reload can be done:
-- package.loaded['vshard.router'] = nil
-- vshard.router = require('vshard.router')

Before hot-reload from new to old on storage

local function worker_cancel(module)
    local worker = module.worker
    if worker ~= nil and worker.fiber ~= nil then
        pcall(worker.fiber.cancel, worker.fiber)
    end
end

local function replicaset_workers_cancel_all(replicasets)
    for _, rs in pairs(replicasets) do
        worker_cancel(rs)
        for _, r in pairs(rs.replicas) do
            worker_cancel(r)
        end
    end
end

-- Execute on storages before reload:
replicaset_workers_cancel_all(vshard.storage.internal.replicasets)

-- Now hot reload can be done:
-- package.loaded['vshard.storage'] = nil
-- vshard.storage = require('vshard.storage')

Ignoring these actions will result in duplicate internal services.

Functionality added or changed

  • vshard.storage.bucket_ref() has been optimized and now works faster (#285).

  • Master discovery has been optimized for better performance. However, the router can no longer discover multiple masters within a replicaset (#541, #549).

  • Introduced the connection_fetch_schema option, which allows disabling fetching schema in vshard connections (#408).

  • bucket_ids option in partial map_callrw can now be a key-value table in addition to an array. When bucket_ids is key-value table, the values are treated as split arguments, which are passed only to the replicasets that have the corresponding buckets (#539).

  • Introduced failover configuration options: failover_sequential_fail_count - how many failed requests must be done before marking replica as unhealthy; failover_interval - how often replicas are pinged; failover_replica_lag_limit - the maximum number of seconds replica can lag from master before it's marked as unhealthy (#505).

Bugs fixed

  • All types of read-only requests now skip dead replicas. Previously, it worked only for callro (#505).

  • Fixed vshard.storage.info(), which incorrectly showed alerts for all connected replicas, e.g. disconnected anon replicas caused alert. Now only replicas from configuration are shown (#493).

  • Fixed vshard.storage.info(), which could fail with LuaJIT error, if replica had upstream = nil in box.info.replication (#513).

  • Fixed GC not deleting outdated bucket routes from memory (#546).

  • Fixed a router not retrying TRANSFER_IN_PROGRESS error (#548).

  • Fixed the rebalancer being blocked for timeout of map_callrw request, when partial map_callrw failed with error (#554).

  • Fixed the failover assertion failure during rolling upgrade, which happened, if router was upgraded earlier than storage (#556).

  • Fixed failover lowering priority of a replica, if replica was disconnected from a master even for a moment (#512).

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载