Skip to content
This repository has been archived by the owner on Jun 7, 2021. It is now read-only.

[TRAFODION-3166] enhance 8427 error detail when thrown by sequence operator #1665

Merged
merged 4 commits into from Aug 2, 2018

Conversation

prashanth-vasudev
Copy link
Contributor

ERROR[8427] [2018-07-23 15:52:16]

will now be more descriptive

*** ERROR[8427] Sequence Scratch IO Error occurred. Scratch Error: -10005, System Error: 13, System Error Detail: 0, Details: SQScratchFile::SQScratchFile 3

--- 0 row(s) selected.

@prashanth-vasudev prashanth-vasudev changed the title TRAFODION-3166 enhance 8427 error detail when thrown by sequence operator [TRAFODION-3166] enhance 8427 error detail when thrown by sequence operator Jul 26, 2018
@Traf-Jenkins
Copy link

Check Test Started: https://jenkins.esgyn.com/job/Check-PR-master/2870/

@Traf-Jenkins
Copy link

@@ -1487,7 +1487,35 @@ void ExSequenceTcb::updateDiagsArea( ExeErrorCode rc_)
}
if (!da->contains((Lng32) -rc_))
{
*da << DgSqlCode(-rc_);
char msg[512];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice if you can encapsulate these changes in cluster_->flush(). The caller doesn't need to know about the internals of cluster_

@Traf-Jenkins
Copy link

New Check Test Started: https://jenkins.esgyn.com/job/Check-PR-master/2873/

@Traf-Jenkins
Copy link

@Traf-Jenkins
Copy link

New Check Test Started: https://jenkins.esgyn.com/job/Check-PR-master/2901/

@Traf-Jenkins
Copy link

@selvaganesang
Copy link
Contributor

+1, but it would be good to take care of the minor comments.

@Traf-Jenkins
Copy link

New Check Test Started: https://jenkins.esgyn.com/job/Check-PR-master/2910/

// if no errors this code path is not visited
if ( rc_ )
if (myDiags)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is good to not to treat pointers as boolean variable

scratchSysErrorDetail,
errorMsg);

str_sprintf(msg, "Scratch IO Error occurred. Scratch Error: %d, System Error: %d, System Error Detail: %d, Details: %s",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider replacing with snprintf.

//if rc != EXE_OK then it is error.
if(!flush(&rc)) {
if(rc != EXE_OK) {
da = ComDiagsArea::allocate(heap);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is possible that caller might pass-in a diags Area with warnings

scratchSysErrorDetail,
errorMsg);

str_sprintf(msg, "Cluster::read Scratch IO Error occurred. Scratch Error: %d, System Error: %d, System Error Detail: %d, Details: %s",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment as above

@Traf-Jenkins
Copy link

@asfgit asfgit merged commit 6445a49 into apache:master Aug 2, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
4 participants