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

Reduce number of transactions for #mark_collection_as_read #94

Merged

Conversation

fatkodima
Copy link
Contributor

@fatkodima fatkodima commented Jan 21, 2018

Inner transactions are not necessary (if I'm not missing something obvious) and can be replaced as was done in this PR.

Fixes #80.

@fatkodima fatkodima force-pushed the optimize-mark_collection_as_read branch from d29c431 to 747df0f Compare January 21, 2018 23:06
@coveralls
Copy link

coveralls commented Jan 21, 2018

Coverage Status

Coverage remained the same at 100.0% when pulling bc716f0 on fatkodima:optimize-mark_collection_as_read into 6c7a1bd on ledermann:master.

@ledermann
Copy link
Owner

Thanks for your work, but this transaction seems to be needed for PostgreSQL. Please see here:
#78

@ledermann ledermann closed this Jan 25, 2018
@fatkodima
Copy link
Contributor Author

@ledermann Yes, you are right. I should probably better read git history of changing files.
This, however, can be easily optimized for mysql and sqlite without using inner transactions. Implementation for postgresql should left as is with inner transactions.

What do you think, should I rework this or left for #95?

@ledermann
Copy link
Owner

Thanks @fatkodima, your commitment is is highly appreciated!

Implementing a DB switch to use inner transactions for PostgreSQL only seems a good improvement to me.

Regarding #95: I'd prefer to avoid adding a new gem dependency (upsert) into this little project.

@ledermann ledermann reopened this Jan 26, 2018
@fatkodima
Copy link
Contributor Author

Ok, I will update this PR with db switch.

Regarding #95: I'd prefer to avoid adding a new gem dependency (upsert) into this little project.

Yes, I'm not also a big fan of dependencies. Will appreciate, if you have suggestions of how that feature can be implemented in other ways.

@fatkodima fatkodima force-pushed the optimize-mark_collection_as_read branch from b34110a to 2add795 Compare January 26, 2018 16:35
@fatkodima
Copy link
Contributor Author

@ledermann Updated this.

@ledermann ledermann merged commit 7513518 into ledermann:master Jan 28, 2018
@ledermann
Copy link
Owner

Great work, thanks!

@fatkodima fatkodima deleted the optimize-mark_collection_as_read branch January 28, 2018 11:26
HwakyoungLee pushed a commit to grepp/unread that referenced this pull request May 12, 2023
)

* Reduce number of transactions for #mark_collection_as_read
* Fix warning, obj is already given
* Use timestamp
* Add some comments
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