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

Longer fid #22

Merged
merged 2 commits into from
Jun 15, 2016
Merged

Longer fid #22

merged 2 commits into from
Jun 15, 2016

Conversation

hrchu
Copy link
Member

@hrchu hrchu commented May 31, 2016

No description provided.

@hrchu
Copy link
Member Author

hrchu commented May 31, 2016

Note that I do not use unsigned long since Long.parseUnsignedLong() is only available in Java 8.

ps. the issue break my production site about twelve hours :(

@hrchu
Copy link
Member Author

hrchu commented May 31, 2016

Of cause it pass unit test and integration test.

@hrchu
Copy link
Member Author

hrchu commented Jun 13, 2016

@massdosage @jyukutyo could you review and merge this if think the code is ok? Thanks

@jyukutyo
Copy link

Sorry for late. I reviewed code and it is OK!

@hrchu
Copy link
Member Author

hrchu commented Jun 13, 2016

Thanks @jyukutyo, could you also review #23 #24 when you have time?

@massdosage
Copy link
Member

Sorry for the long delay, I've been really busy and then away on holiday but I'm back now. This PR looks fine but makes me wonder why we modelled it as a number in the first place, possibly this was based on the previous Java client. What is the type of fid in the underlying MogileFS database? (I don't have it all setup on the machine I'm currently on)

@hrchu
Copy link
Member Author

hrchu commented Jun 14, 2016

It is AUTO_INCREMENT INT in mogilefs tracker db (It may differ if you use other RDBMS except mysql)

@massdosage
Copy link
Member

Hmm, a MySQL INT should map just fine to a Java int type (see http://dev.mysql.com/doc/refman/5.7/en/integer-types.html) unless there is some way you can say it's unsigned in which case it would need to be a long. I assume you've actually run into this issue in production so it can happen?

@hrchu
Copy link
Member Author

hrchu commented Jun 15, 2016

@massdosage oh sorry for the wrong info, It is actually bigint(20) unsigned since mogilefs 2.32

@massdosage
Copy link
Member

OK, a long makes sense then. I'll merge.

@massdosage massdosage merged commit 58bb171 into master Jun 15, 2016
@massdosage massdosage deleted the longerFid branch June 15, 2016 09:12
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

Successfully merging this pull request may close these issues.

3 participants