bitmap, yvanzo: should put a beta out today but we have only 3 tickets to release, I'll wait for the evening I guess in case we can review and merge some more things :)
I requested the export again now, by previous estimates we'll be able to see the data in ~a week.
mayhem
ok, good job moving goliath, lucifer !
lucifer
hehe :D
reosarevok
Ooh
Sweet
alastairp
morning
welcome back PrathameshG[m], congratulations on finishing your exams
lucifer
morning!
alastairp
aerozol: no, there are no guidelines for how to moderate CB, and I don't think there has been much moderation applied so far. You're welcome to give it a go and come up with your own guide (if in fact we do get notifications, I had a quick look and there are very few)
Ansh
alastairp: For connecting BB db to CB and fetching data, do I need to create a model for the BB database and then fetch the data like we do with BU, or simple SQL queries would work ?
alastairp
Ansh: great question. traditionally, most metabrainz projects use sql queries. There is one exception in the musicbrainz_db package in brainzutils, which uses a set of models and the sqlalchemy ORM
in my opinion, ORMs are useful if you have to do very basic create/get queries. I'm not familiar with the BB schema, so I don't know how complex it is. I know that monkey uses a JS-based ORM for database access in BB
Ansh
Got it
Also I found that some Authors, Work, Editions for BB have an associated MBID. So when the user reviews the author, should they review against the BBID or the MBID or both ?
alastairp
:) another amazing question
we've had this discussion before within the context of the bookbrainz database and how it integrates with musicbrainz. I don't think there's a clear answer yet. For this project I think it would be easiest to consider the two databases separate, so you can review either the BB author or the MB composer
however, maybe over the next few months we can have a discussion with monkey and see if it's possible to integrate BB and MB more in this regard. (it could be as simple as another field in the BB database that says a particular entity is the same as an MB entity)
PrathameshG[m]
<alastairp> "welcome back PrathameshG..." <- Thanks!
being directly able to use the column name for reseting values seems useful.
alastairp
right, without knowing the name of the sequence?
lucifer
creating a new sequence on create table like may be problematic for the atomic table swap trick we use. those tables aren't meant to be inserted in directly but if ever want to there'll be conflicts.
yes
alastairp
for the main metadata cache table we removed the sequence anyway, because of the same problem
lucifer
ah i see
alastairp
so you're saying if we insert into a table with an id column (and it automatically goes and updates the counter), and then we rename the column and then try and insert into the renamed column, then... ?
lucifer
but in that case the sequence would be shared so this problem shouldn't have occurred anyway? or were the sequence values were being inserted manually from python.
alastairp
yeah, in the initial version the id value was generated in python and directly inserted
lucifer
>so you're saying if we insert into a table with an id column (and it automatically goes and updates the counter), and then we rename the column and then try and insert into the renamed column, then... ?
is this about being able to insert without knowing seq name or about the table insertion issue?
alastairp
I guess about table insertion
you said that it might be problematic for the table swap trick, but I'm not 100% sure what you are saying the problem is
lucifer
ah column rename isn't an issue iiuc. we rename tables though.
alastairp
I did notice that I got into some situation where the sequence was named differently for the table
as mentioned in the 2ndquadrant link:
> Here, of course, it appears in the error message, and it is easy to guess, but sometimes a slightly different name is chosen, and then your deployment scripts will fail.
lucifer
CREATE TABLE test_foo (id SERIAL). it creates test_foo_id_seq, now we do CREATE TABLE foo (LIKE test_foo). continues to use test_foo_id_seq. if we had inserted 10k rows in test_foo, insertion in foo will start from 10001.
alastairp
because we rename the table and the indexes, but not the sequence. so in the case where we do need an id field, an identity would be better than a serial because it wouldn't be lying around with a wrong name
ah! I didn't know that
lucifer
but if its identity coulmn, it restarts from 1.
alastairp
we don't use LIKE in the metadata cache table, but I recall that it's used somewhere else
Hi bitmap! I tried hydrating https://github.com/metabrainz/musicbrainz-serve... please check the latest commit and let me know how it could be corrected :) Other than that we have one selenium test failing, so after fixing that this PR should be good to go according to me
lucifer
but we don't have a SERIAL there so fine there too.
alastairp
lucifer: do you know how identity columns work when you are restoring dumps?
To fix the error, you can use the OVERRIDING SYSTEM VALUE clause as follows:
Hi reosarevok! We wanted you to review the wordings for https://github.com/metabrainz/musicbrainz-serve... after that we can look to merge :) You did review another PR so just wanted to check whether the two were mixed up :)
lucifer
it appears pg dump handles that automatically but for the copy_table stuff we use probably need to handle manually
reosarevok
I'll take a look :) I try not to work weekends, so I had left this for Monday
alastairp
lucifer: and will an identity field solve the problem we had when swapping pg primary when the id skipped?
akshaaatt
Amazing, thanks!
reosarevok
Let me see
lucifer
alastairp: unfortunately no. identity columns can have gaps too. same behaviour as serial in that case.
alastairp
right
PrathameshG[m]
<alastairp> "welcome back PrathameshG..." <- thanks ^_^