influxdb/influxdb — pull request #695 by seunglee150 (2014-06-26 07:04:01+00:00)
Title: prevent duplicate time, sequence_number on write

duplicate "time" or "sequence_number" column leads to panic. prevent this by filter out invalid request.

## test request
```
/db//series?u=&p=
[
{
"name" : "hd_used",
"columns" : ["time", "value", "time", "host", "mount"],
"points" : [
[1403761091094, 23.2, 1403761091094, "serverA", "/mnt"]
]
}
]
```

## result
```
panic: runtime error: index out of range

goroutine 18 [running]:
runtime.panic(0x448dd60, 0x4a601f7)
/Applications/go/src/pkg/runtime/panic.c:266 +0xb6
datastore.(*Shard).Write(0xc2100d3940, 0xc21031ae86, 0x4, 0xc2102eac48, 0x1, ...)
/Users/niko/git/influxdb/src/datastore/shard.go:83 +0xc7f
datastore.(*ShardDatastore).Write(0xc21009baf0, 0xc21014b800, 0x0, 0x0)
/Users/niko/git/influxdb/src/datastore/shard_datastore.go:231 +0xf2
cluster.(*WriteBuffer).write(0xc210106690, 0xc21014b800)
/Users/niko/git/influxdb/src/cluster/write_buffer.go:88 +0x86
cluster.(*WriteBuffer).handleWrites(0xc210106690)
/Users/niko/git/influxdb/src/cluster/write_buffer.go:79 +0xb7
created by cluster.NewWriteBuffer
/Users/niko/git/influxdb/src/cluster/write_buffer.go:43 +0x24f
```