scalien/scaliendb — Issue #317: Empty key causes ASSERT
Author: mtrencseni
Created: 2011-11-02 17:34:21+00:00
State: open
Labels: mtrencseni

./scaliendb(_ZN17StorageLogSegment12AppendDeleteEtmR10ReadBuffer+0x44)[0x48ca74]
./scaliendb(_ZN18StorageEnvironment6DeleteEtm10ReadBuffer+0x10b)[0x4823cb]
./scaliendb(_ZN20ShardDatabaseManager14ExecuteMessageEmmmR12ShardMessage+0x3fe)[0x45ee4e]
./scaliendb(_ZN20ShardQuorumProcessor14ExecuteMessageEmmP12ShardMessageb+0x150)[0x46b230]
./scaliendb(_ZN20ShardQuorumProcessor14OnResumeAppendEv+0x18d)[0x46b76d]
./scaliendb(_ZN13ReplicatedLog18ProcessLearnChosenEmm+0x100)[0x477a10]
./scaliendb(_ZN18ShardQuorumContext14OnPaxosMessageE10ReadBuffer+0x6b)[0x46753b]
./scaliendb(_ZN18ShardQuorumContext9OnMessageEm10ReadBuffer+0xf6)[0x467646]
./scaliendb(_ZN16ContextTransport15OnQuorumMessageEmR10ReadBuffer+0x77)[0x43b097]
./scaliendb(_ZN16ContextTransport9OnMessageEm10ReadBuffer+0xde)[0x43bcde]
./scaliendb(_ZN17ClusterConnection9OnMessageER10ReadBuffer+0x59)[0x46f419]
./scaliendb(_ZN17MessageConnection6OnReadEv+0x198)[0x471668]
./scaliendb[0x49d6c3]
./scaliendb(_ZN11IOProcessor4PollEi+0x24e)[0x49da3e]
./scaliendb(_ZN9EventLoop3RunEv+0x1e)[0x49914e]
./scaliendb(_Z14RunApplicationv+0x95)[0x4a0b35]
./scaliendb(_ZN7Service4MainEiPPcPFvvE+0x6)[0x49ef56]
./scaliendb(main+0xa)[0x4a08ea]
/lib/libc.so.6(__libc_start_main+0xfd)[0x7ff43b229c4d]
./scaliendb[0x436e39]
scaliendb: src/Framework/Storage/StorageLogSegment.cpp:150: int32_t StorageLogSegment::AppendDelete(uint16_t, uint64_t, ReadBuffer&): Assertion `key.GetLength() > 0' failed.
Aborted

A batch mód SINGLE volt. A Java program ilyesmi volt:

import com.scalien.scaliendb.Client;
import com.scalien.scaliendb.Database;
import com.scalien.scaliendb.KeyValue;
import com.scalien.scaliendb.Query;
import com.scalien.scaliendb.StringKeyValueIterator;
import com.scalien.scaliendb.Table;

public class ListTable {

public static void main(String[] args) throws Exception {
Client c = new Client("192.168.1.200:7080");
c.setBatchMode(Client.BATCH_SINGLE);
Database d = c.getDatabase("naxos");
Table t = d.getTable("index_symbol");
t.set("masik", "23");
t.delete("masik");
t.delete("");
Query q = t.createQuery();
q.setPrefix("");
q.setCount(1000);
System.out.println("NOW");
for (KeyValue kv: q.getStringKeyValueIterator()) {
System.out.format("%s = %s\n", kv.getKey(), kv.getValue());
}
}
}