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

Questions about Cassandra table models #39

Open
jjchen opened this issue Apr 15, 2014 · 3 comments
Open

Questions about Cassandra table models #39

jjchen opened this issue Apr 15, 2014 · 3 comments
Labels

Comments

@jjchen
Copy link
Collaborator

jjchen commented Apr 15, 2014

( @krishnan-chandra It seems like you might be the best person to direct this to?)
I have a couple questions about the cassandra tables (in create_everything.cql):

The comment for tid in the results table says that it is the "time at which we record the result", and this seems consistent with what the code in addResult of CassandraBackend (line 340) is doing. However, when we first wrote out the model on the testreduce google doc, there's a comment that says "each git has has one tid associated (when first request for it is received)". So I thought that the tid was a way of connecting the result to a particular commit? Otherwise, is there a way to get a particular test result from the results table (like for a particular commit)? Am I missing something?

Also, what is the function of the delta in test_by_score? I couldn't find where it was used in the code? Does it need to be in the primary key before test? I wanted to be able to query for the score of a particular test from a particular commit, but I don't know what the delta would be.

@krishnan-chandra
Copy link
Collaborator

Sorry for the late response! Here is my understanding of the fields:

The tid is the time at which we first record the result - this should be
equal to the tid of the corresponding commit IIRC. The delta in
test_by_score is supposed to be the change in the score from the last time
the test was run. As I remember it we were trying to avoid associating
every test with a specific commit hash because we wanted to be able to look
at a test independent of its commit. We may need to change the order of the
primary key so that test comes before delta.

On Tue, Apr 15, 2014 at 12:25 AM, jjchen [email protected] wrote:

( @krishnan-chandra https://github.com/krishnan-chandra It seems like
you might be the best person to direct this to?)
I have a couple questions about the cassandra tables (in
create_everything.cql):

The comment for tid in the results table says that it is the "time at
which we record the result", and this seems consistent with what the code
in addResult of CassandraBackend (line 340) is doing. However, when we
first wrote out the model on the testreduce google doc, there's a comment
that says "each git has has one tid associated (when first request for it
is received)". So I thought that the tid was a way of connecting the result
to a particular commit? Otherwise, is there a way to get a particular test
result from the results table (like for a particular commit)? Am I missing
something?

Also, what is the function of the delta in test_by_score? I couldn't find
where it was used in the code? Does it need to be in the primary key before
test? I wanted to be able to query for the score of a particular test from
a particular commit, but I don't know what the delta would be.


Reply to this email directly or view it on GitHubhttps://github.com//issues/39
.

Krishnan

@jjchen
Copy link
Collaborator Author

jjchen commented Apr 18, 2014

No problems, thanks for answering :)

I though the tid of the result and the corresponding commit should be equal, but looking at the code in addResult, it doesn't seem like it would be?

Okay, so I can change the order of the primary key in test_by_score? It didn't seem like it would affect anything in the current code, but do you know of anything that would break if I put test before delta?

@jjchen
Copy link
Collaborator Author

jjchen commented Apr 18, 2014

Actually, nvm on the second part (the test_by_score thing) - I think I'll be using just the tests table.

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

No branches or pull requests

2 participants