Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exec() returning ErrNotFound #1704

Open
arvy opened this issue Jun 15, 2023 · 1 comment
Open

Exec() returning ErrNotFound #1704

arvy opened this issue Jun 15, 2023 · 1 comment

Comments

@arvy
Copy link

arvy commented Jun 15, 2023

Opening this issue on behalf of a customer (vijay.rahulsagar@aexp.com) - please reach out for further details.

What version of Cassandra are you using?

DSE 6.8.23

What version of Gocql are you using?

1.4.0

What version of Go are you using?

N/A

What did you do?

Executing insert statements like this:

query := r.db.Query(insertQuery)
	r.log.Loggings([logger.Info](https://logger.info/), r.GetUUTID(), fmt.Errorf("%s insert gicc sequence query:[%s]", eventcodes.GeneralInfo, query.String()), r.GetRulzHeaders())
	t := time.Now()
	var buf *bytes.Buffer
	var trace gocql.Tracer
	if cfg.Toggle(enableTracer) {
		trace, buf = r.QueryTrace()
		query = query.Trace(trace)
	}
	err = query.Exec()
	r.log.Loggings(logger.Debug, r.GetUUTID(), fmt.Errorf("%s query trace for inserts into gicc:[%s]", eventcodes.CassandraQuery, buf.String()), r.GetRulzHeaders())
	if err != nil {
		r.SetMetricsError(err, insertaction, terminalSeqTable)
		r.log.Loggings(logger.Error, r.GetUUTID(), fmt.Errorf("%s : for gicc sequence :%v", eventcodes.CassandraWriteError, err), r.GetRulzHeaders())
		//setting terminal_terminal_trouble_issue code to 005 in case of error while inserting-- for GICC spec
		r.SetStringData(terminalTroubleIssueCode, databaseInsertError.String())
		return fmt.Errorf("%s : for gicc sequence :%v", eventcodes.CassandraWriteError, err)
	}

Note: r.db above represents a session object

What did you expect to see?

Did not expect ErrNotFound from an Exec() call

What did you see instead?

E3092: Unable to write data to cassandra  : for gicc sequence :not found 

..apparently caused by ErrNotFound

@martin-sucha
Copy link
Contributor

Hi @arvy, I don't see how this could happen for an insert query. Please, do you have any steps how to reproduce the issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants