Single Record Created Using a JSON PreparedStatement

Description

Posted a question here: http://stackoverflow.com/questions/33793255/python-cassandra-driver-only-inserts-one-record

  1. # trial one
    batch = BatchStatement(consistency_level=ConsistencyLevel.QUORUM)
    stmt = cassy_session.prepare("INSERT INTO social_objects JSON ?;")
    batch.add(stmt, (json.dumps(so_record),))
    stmt = cassy_session.prepare("INSERT INTO social_objects JSON ?;")
    batch.add(stmt, (json.dumps(so_record2),))
    cassy_session.execute(batch)

  1. trial two
    stmt = cassy_session.prepare("INSERT INTO social_objects JSON ?")
    cassy_session.execute(stmt, ['json'])
    stmt = cassy_session.prepare("INSERT INTO social_objects JSON ?")
    cassy_session.execute(stmt, ['json'])

Only a single object is created in the table no matter what I do. Not specifying JSON and using columns/values seems to work just fine.

Environment

None

Pull Requests

None

Activity

Show:
Tyler Hobbs
November 19, 2015, 5:04 PM

I believe you're seeing CASSANDRA-10631, which affects prepared INSERT JSON statements.

Adam Holmberg
November 23, 2015, 3:04 PM

Closing since this appears to be a known server issue.

Not a Problem

Assignee

Unassigned

Reporter

Justin Thomas

Fix versions

None

Labels

None

Reproduced in

None

PM Priority

None

External issue ID

None

Doc Impact

None

Reviewer

None

Size

None

Pull Request

None

Affects versions

Priority

Major
Configure