[MDEV-530] Cassandra SE: Locking is incorrect Created: 2012-09-12 Updated: 2012-09-14 Resolved: 2012-09-14 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Sergei Petrunia | Assignee: | Sergei Petrunia |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Description |
|
I was loading data into Cassandra, and tried to select from it at the same time. I got the following:
Is the engine too strict on locking? |
| Comments |
| Comment by Elena Stepanova [ 2012-09-13 ] |
|
Why is it wrong? You'd have the same with, say, a MyISAM table. |
| Comment by Sergei Petrunia [ 2012-09-14 ] |
|
This is wrong, because it's a limitation that doesn't make sense. MyISAM is a local, non-transactional storage. If you lock a MyISAM table, you can then make updates and be sure no one has interfered with them. Cassandra is a remote storage. There is no way to make sure that nobody has accessed the row you've just read. Why restrict updates from the local server, then? Also, cassandra's data model and architecture show systematic avoidance of any kinds of locking. For example, update operations are specifically designed to be interchangeable (the one with greater timestamp wins). Counters have a special implementation that accepts increment/decrement operation, instead of the usual "lock; modify; unlock" way, etc. |
| Comment by Sergei Petrunia [ 2012-09-14 ] |
|
Discussed with Serg, changed locking to be like in ha_blackhole. |