10:25 AM
alastairp
so if for example it was `None` or `{}`, then the `[0]` would cause an error
10:25 AM
even if it was `[]` we'd get an error
10:26 AM
Pratha-Fish: right. I was looking at the other one. that's good then
10:26 AM
ansh
The edition group['author_credits'] returns an array of objects. So if it does not exist, the database returns [None]
10:26 AM
alastairp
how many items did you look up to result in just these 2?
10:26 AM
ansh: is this the direct result from the view?
10:26 AM
ansh
yes
10:27 AM
I added a table in the views for the author credits
10:27 AM
alastairp
right, that's a bit strange. give me a moment, I want to check this query myself
10:27 AM
Pratha-Fish: that first one is really weird... is this a uuid being used as an artist name? or a bug in the generation of the table?
10:27 AM
ansh
Sure
10:30 AM
Pratha-Fish
alastairp: I rechecked that one, apparently, it's a uuid that's being used as artist name!
10:30 AM
Sophist-UK has quit
10:30 AM
No bugs in table generation afaik
10:31 AM
Sophist-UK joined the channel
10:31 AM
alastairp
what's the original recording mbid, then?
10:32 AM
Pratha-Fish: oh, I think I worked out the unicode issue
10:32 AM
we never actually made this an html document
10:32 AM
10:32 AM
check out the last section - "The Complete HTML5 Boilerplate"
10:33 AM
Sophist_UK joined the channel
10:33 AM
we should use something like that. we don't need any of the `<meta property=>` or `<link>` or `<script>` tags, but copy the rest
10:33 AM
and put the table inside <body>
10:33 AM
Pratha-Fish
alastairp: The original recording MBID is the same as the artist_name, recording_name, and the canonical_mbid!
10:34 AM
alastairp
Pratha-Fish: that's why I think it's a bug
10:34 AM
because when I click on the link for the canonical mbid, musicbrainz tells me that it doesn't exist
10:34 AM
but that's almost certain to be impossible, all canonical mbids should exist
10:35 AM
Sophist-UK has quit
10:36 AM
Pratha-Fish
alastairp: exactly! That ID doesn't exist in the musicbrainz table. I just rechecked the specific row in jupyter, and here's what I've found
10:36 AM
10:36 AM
This is before running the mbc.
10:37 AM
mlhd_recording_mbid is from MLHD
10:37 AM
mlhd_canonical_mbid is what I found by looking up the mlhd_recording_mbid in redirects and then canonical table
10:38 AM
Then the mlhd_canonical_mbid is then used with an artist_credit query
10:38 AM
alastairp
where do you get rec_name from?
10:39 AM
(btw, this is another great reason to have our code in scripts rather than a notebook, because then you could link me to the exact line in github)
10:39 AM
Pratha-Fish
alastairp: The rec_name and artist_credit are fetched using a SQL query
10:39 AM
So I am guessing it's a fault in the musicbrainz db
10:39 AM
alastairp
the fact that rec_name is the same as mlhd_recording_mbid makes me thing that there's a bug with this sql query
10:39 AM
no, almost certainly not an issue with the database, probably a problem with the way that we are reading it
10:39 AM
Pratha-Fish
alastairp: thankfully I have all this data in a script as well :D
10:40 AM
alastairp
great! where's the line, then?
10:40 AM
Sophist-UK joined the channel
10:41 AM
Pratha-Fish
10:41 AM
alastairp: The row I shared earlier is from this particular table. All other rows have their specific rec_name and artist_credit data in place
10:42 AM
10:42 AM
10:42 AM
alastairp
what line makes this dataframe? (please make it easy for me to follow along)
10:43 AM
you can click on a line number to get a URL that links to the line
10:43 AM
Pratha-Fish
right, sorry for the confusion
10:43 AM
Sophist_UK has quit
10:44 AM
Sophist_UK joined the channel
10:44 AM
Sophist_UK has quit
10:44 AM
10:45 AM
Sophist-UK has quit
10:45 AM
This line fetches rec_name and artist_credit using the artist_credit_list query that you shared last week
10:46 AM
alastairp
Pratha-Fish: I'd look in detail at your replace_multi method
10:46 AM
Pratha-Fish
right
10:46 AM
Sophist-UK joined the channel
10:46 AM
10:46 AM
alastairp
immediately, I suspect that the item (recording mbid) that you're trying to look up doesn't exist in the musicbrainz database any more, and it's using the lookup key as the result rather than returning "none" or something
10:47 AM
reading the code, I can't confirm if that is the case, but I suspect so
10:47 AM
Pratha-Fish
Hmm that seems likely
10:49 AM
10:49 AM
Here's what the replace_multi function uses under the hood.
10:49 AM
Aaand you were exactly right!
10:49 AM
alastairp
yes, I saw that. but I don't know pandas enough to understand that behaviour just by reading the code
10:49 AM
Pratha-Fish
10:50 AM
alastairp: ^ The above code just looks up the input value (in this case canonical_mbid) in the specified table (the artist_credit one)
10:50 AM
alastairp
oh right. I missed the 'except KeyError'
10:50 AM
Sophist-UK has quit
10:50 AM
Sophist_UK joined the channel
10:50 AM
Pratha-Fish
yep :)
10:51 AM
i.e. in this particular case the "canonical_mbid" simply doesn't exist in the table
10:51 AM
alastairp
ansh: do you have an example of an edition group whose author list is [None] ?
10:52 AM
Pratha-Fish: sorry, I have to run now. I have an event in an hour and need to go and get lunch first
10:52 AM
do you have enough to work on?
10:52 AM
Pratha-Fish
alastairp: It's alright! I think I have enough to work on right now.
10:52 AM
alastairp
finding this issue + doing fast lookups for mbc + fixing html table output sounds like it should keep you busy
10:53 AM
Pratha-Fish
that's right
10:53 AM
alastairp
great, tomorrow morning I'm giving a talk, but I should be online with my laptop through the afternoon
10:53 AM
ansh
alastairp: yep '02ae4cfc-6412-4693-93b1-e24dce5e31f9'
10:54 AM
alastairp
ansh: thanks, I'll check this when I'm finished with my other tasks today
10:54 AM
Pratha-Fish
alastairp: great, I'll ping you only when required.
10:54 AM
ansh
I feel we should move this variable `DEFAULT_CACHE_EXPIRATION` used in many places to our config file, it would be really useful. We could disable cache with a single click :)
10:55 AM
Sophist_UK has quit
10:56 AM
alastairp
ansh: go ahead and open a PR for that!
10:56 AM
ansh: normally when I do this, I open a redis shell and just run FLUSHALL
10:56 AM
ansh: one really small thing too - I was just looking at the sql query in `fetch_multiple_edition_groups` and it has a trailing ;
10:56 AM
this isn't needed when running sql from python, can you remove it?
10:58 AM
ansh
alastairp: I'll remove the semicolon
10:58 AM
alastairp
ansh: I ran this query with the bbid, and see the result. to me this seems a bit odd, and it might be better to try and modify the aggregate to make the query return [] instead of [null]
10:59 AM
alastairp gone
11:01 AM
ansh
alastairp: Okay, i'll try to modify it.
11:17 AM
s1b1 has quit
11:22 AM
s1b1 joined the channel
11:41 AM
yvanzo
hi reosarevok: my dev env is currently broken, do you plan to work on MBS-12512 again today?
11:41 AM
BrainzBot
11:42 AM
reosarevok
That's supposed to be fixed with the latest sample dump we generated a few days ago
11:42 AM
Have you tried it?
11:42 AM
Hmm, checking
11:43 AM
yvanzo
I tried it, see the comments.
11:43 AM
Have you tried it?
11:43 AM
reosarevok
No, because I got a report that it worked fine now
11:43 AM
Let's see
11:51 AM
yvanzo
zas: I have access, thanks.
12:03 PM
reosarevok
yvanzo: it's fixed, but the fix was merged into production
12:03 PM
So you need to also import from the production branch
12:03 PM
(I tested, importing from master skips genre_alias_type, but from prod it does not)
12:03 PM
yvanzo
Alright, thank you, will test.
12:04 PM
reosarevok
I'm still finishing an import in prod, you can wait 5 min if you want me to confirm :)
12:04 PM
But it didn't skip that, at least
12:10 PM
yvanzo: confirmed, worked in the production branch
12:12 PM
yvanzo
It worked here too.
12:12 PM
reosarevok
Yay
12:12 PM
Sorry for not checking that first and causing the annoyance
12:13 PM
yvanzo
No problem, thanks for the quick resolution.
12:16 PM
PetrCBRCZ
yvanzo: do you have another tip how to clean cache for slave MB installation ?
12:16 PM
yvanzo
PetrCBRCZ: that was the reason I was trying to refresh my dev env, still on it.
12:18 PM
PetrCBRCZ
yvanzo: ahh ... ok ...thx ;-)
12:27 PM
yvanzo
PetrCBRCZ: It returns "OK" here.
12:30 PM
The message you copied is returned by the following command? sudo docker-compose exec redis redis-cli FLUSHALL
12:31 PM
PetrCBRCZ
yes ... it returns "(error) READONLY You can't write against a read only slave."
12:33 PM
yvanzo
You should be able to check the number of items in Redis database with: sudo docker-compose exec redis redis-cli DBSIZE
12:34 PM
PetrCBRCZ
(integer) 388069
12:47 PM
yvanzo
It is unclear why it would be set to READONLY.
12:47 PM
PetrCBRCZ: Try that instead: sudo docker-compose exec redis redis-cli FLUSHDB
12:48 PM
PetrCBRCZ
same error
12:48 PM
yvanzo
There might be an issue with your Redis instance.
12:49 PM
INFO should provide more details for debugging.
12:50 PM
PetrCBRCZ
# Server
12:50 PM
redis_version:3.2.12
12:50 PM
redis_git_sha1:00000000
12:50 PM
redis_git_dirty:0
12:50 PM
redis_build_id:b9a4cd86ce8027d3
12:50 PM
redis_mode:standalone
12:50 PM
os:Linux 5.4.0-121-generic x86_64
12:50 PM
arch_bits:64
12:50 PM
multiplexing_api:epoll
12:50 PM
gcc_version:6.4.0
12:50 PM
process_id:1
12:50 PM
run_id:8fc13aa160b0d4e660ae3f0de2c91bd4b5d6ca90
12:50 PM
tcp_port:6379
12:50 PM
uptime_in_seconds:1649137
12:50 PM
uptime_in_days:19
12:50 PM
hz:10
12:50 PM
lru_clock:14759047
12:50 PM
executable:/data/redis-server
12:51 PM
mem_allocator:jemalloc-4.0.3
12:51 PM
# Persistence