Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in trigger bucket_on_truncate_f #400

Closed
d-enk opened this issue Feb 21, 2023 · 0 comments · Fixed by #405
Closed

Error in trigger bucket_on_truncate_f #400

d-enk opened this issue Feb 21, 2023 · 0 comments · Fixed by #405
Assignees
Labels
bug Something isn't working customer storage

Comments

@d-enk
Copy link

d-enk commented Feb 21, 2023

Error in drop method after truncate

.rocks/share/tarantool/vshard/storage/init.lua:528: attempt to index local 'new_tuple' (a nil value)

Reproduce:

local cfg = {
  bucket_count = 1,
  sharding = {
    ["aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa"] = {
      replicas = {
        ["aaaaaaaa-aaaa-aaaa-aaaa-000000000000"] = {
          uri = "test:@0.0.0.0:3301",
          master = true,
        },
      },
    },
  },
}

require("vshard").storage.cfg(cfg, "aaaaaaaa-aaaa-aaaa-aaaa-000000000000")

local space = box.schema.space.create("SPACE")

space:truncate()
space:drop()

tarantool == 2.10.5-1
vshard == 0.1.22-1

@Gerold103 Gerold103 added bug Something isn't working storage labels Feb 21, 2023
Gerold103 added a commit that referenced this issue Mar 23, 2023
There is an on_replace trigger in _truncate space protecting from
_bucket space clearance. The trigger wasn't ready to _truncate
having deletions. It happens when any previously truncated space
gets deleted.

As a result, _truncate didn't allow any deletions and its tuples
were just staying permanently.

The patch makes the storage ignore _truncate deletions. They don't
affect bucket rows anyway.

Fixes #400

NO_DOC=bugfix
@Gerold103 Gerold103 self-assigned this Mar 23, 2023
Gerold103 added a commit that referenced this issue Mar 23, 2023
There is an on_replace trigger in _truncate space protecting from
_bucket space clearance. The trigger wasn't ready to _truncate
having deletions. It happens when any previously truncated space
gets deleted.

As a result, _truncate didn't allow any deletions and its tuples
were just staying permanently.

The patch makes the storage ignore _truncate deletions. They don't
affect bucket rows anyway.

Fixes #400

NO_DOC=bugfix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working customer storage
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants