Skip to content

Table row count increases without any insertion after server restart. #507

Closed

Description

@JinHai-CN

Once the server is stopped and restarted, the inserted data will increase 40k lines.

Can be reproduced ?

Yes

Steps:

Inserts 100k rows data, then restart the server. Use select count to check the row count.

Expected behavior:

The row count shouldn't change since no data inserted.

Actual behavior:

The total row count increases 40k exactly.

Environment:

  • Version or commit-id (e.g. v0.1.0 or 8b23a93): 7202d31
  • Hardware parameters:
  • OS type: OSX
  • Others:

Configuration file:

Default configuration file.

Additional context:

  • Error message from client:
  • Server log:
  • Other information:

Screen Shot 2021-08-25 at 4 46 20 PM

Activity

  1. added
    kind/bug
    priority/p0
    severity/s1
    on Aug 25, 2021
  2. added this to the v0.1.0 milestone on Aug 25, 2021
  3. changed the title [-]Row count increase without any insertion after server restart.[/-] [+]Row count increases without any insertion after server restart.[/+] on Aug 25, 2021
  4. changed the title [-]Row count increases without any insertion after server restart.[/-] [+]Table row count increases without any insertion after server restart.[/+] on Aug 25, 2021
  5. sukki37 commented on Aug 25, 2021

    @sukki37
    Contributor

    something wrong when local aoe storage handle logindex offset. @XuPeng-SH

    reproduce performance:

    • For this case, blocksize is setting to 40000, insert batch is 97000(in one entry and its logIndex is 8).
      image
    • After the first shutdown, we can find two .blk files in aoe's data directory.
      image
    • When restart begins, the cube will ask the local aoe engine for init logIndex, local aoe engine returned 7, so the write entry will be executed again.
      image
    • Shutdown again, we can find 3 .blk files in aoe's data directory now.
      image

    In conclusion, local storage engine should handle this situation in that the size of the insert batch is over the block size to avoid repeated append.

  6. XuPeng-SH commented on Aug 25, 2021

    @XuPeng-SH
    Contributor

    This error can only occur when the inserted batch exceeds two block sizes. This is a bug handling the insert request from log replay.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

kind/bugpriority/p0severity/s1

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions