Giter Club home page Giter Club logo

Comments (5)

waynexia avatar waynexia commented on June 10, 2024 1

This is a good point... But I can explain why it's 10000 in two aspects

  • The 10000 inserted rows are treated as 10000 independent data, and those duplicates can be seen as "update" to the previous one
  • The dedup process is done on reading. Those 10000 rows are persisted to file in actual.

from greptimedb.

waynexia avatar waynexia commented on June 10, 2024

One possible reason is duplicated rows. Our DB will automatically remove duplication (iff time index + primary key are the same) on read.

from greptimedb.

yuanbohan avatar yuanbohan commented on June 10, 2024

One possible reason is duplicated rows. Our DB will automatically remove duplication (iff time index + primary key are the same) on read.

Yes, but the affected rows in response SHOULD NOT be 10,000, it SHOULD BE the actual affected number of rows

from greptimedb.

evenyag avatar evenyag commented on June 10, 2024

It's not recommended to rely on the value of affected rows. Sometimes it's hard to get the correct affected rows (e.g. DELETE). We return it because some SQL protocols need this.

In your case, rows with the same key are actually inserted twice and the row being overwritten is also "affected". Since our INSERT operation is actually a PUT operation in some NoSQL dbs.

To see whether an insert request is executed successfully, checking the response code is enough.

from greptimedb.

yuanbohan avatar yuanbohan commented on June 10, 2024

This is not a bug, but a workaround solution, and DO NOT rely on the affected row.

from greptimedb.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.