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

File Comments Data Structure #20265

Closed
12 tasks done
blizzz opened this issue Nov 3, 2015 · 17 comments
Closed
12 tasks done

File Comments Data Structure #20265

blizzz opened this issue Nov 3, 2015 · 17 comments
Assignees
Milestone

Comments

@blizzz
Copy link
Contributor

blizzz commented Nov 3, 2015

Contributes to #16328

Comment:

  • id, INTEGER
  • parentid (on replies to comments), INTEGER
  • topmostparentid, INTEGER
  • children-count, INTEGER
  • message, CLOB
  • actorid (== userid), TEXT
  • actortype, TEXT
  • verb (= 'comment'), TEXT
  • timestamp, INTEGER
  • latestchildtimestamp, INTEGER
  • objectype, STRING
  • objectid, STRING

The chosen way to identify comments as unread is to keep a "last seen time" timestamp per user and file, which applies to all file activities (like updates). This would be implemented within the Timelime logic and structure (#20259).

In general, a thing to ensure is it that userids are compatible with federation.

@nickvergessen @PVince81 @DeepDiver1975 @jancborchardt

@blizzz blizzz added this to the 9.0-current milestone Nov 3, 2015
@nickvergessen
Copy link
Contributor

fileid is not always int (depends on the storage)

@PVince81
Copy link
Contributor

PVince81 commented Nov 3, 2015

Please replace "(Un)read status, per comment version:" with "last read status". We don't want each comment to have a flag. We only need the last read date for each file, so the fields would be "fileid, userid, lastdate"

@blizzz
Copy link
Contributor Author

blizzz commented Nov 3, 2015

@nickvergessen @PVince81 adjusted

@DeepDiver1975
Copy link
Member

commantid -> id

@blizzz
Copy link
Contributor Author

blizzz commented Nov 3, 2015

✔️

@PVince81
Copy link
Contributor

PVince81 commented Nov 4, 2015

  • filelid must be string from now on

@nickvergessen
Copy link
Contributor

object type and object id please instead of file id

@DeepDiver1975
Copy link
Member

children-count

@blizzz
Copy link
Contributor Author

blizzz commented Nov 4, 2015

updated the encryption. Set the object type to string, is more explanatory than numbers, especially in URLs.

@nickvergessen
Copy link
Contributor

timestamp of last child for sorting?

@blizzz
Copy link
Contributor Author

blizzz commented Nov 5, 2015

yes, added

@blizzz
Copy link
Contributor Author

blizzz commented Nov 19, 2015

If we want to totally keep a hierarchy possible that is deeper than just one level, we'd need to add a topmostparentid in order to be able to cheaply detect the root of the thread. We agreed that in the file comments matter, 1-level depth might be considerable in future. However, this does not need to apply to all possible use cases of the comments infrastracture. What do you think?

@blizzz
Copy link
Contributor Author

blizzz commented Nov 20, 2015

@nickvergessen
Copy link
Contributor

Well consensus was to make it possible to have it nested.
But we could also not add it now and then when we ever need it, add it.

@blizzz
Copy link
Contributor Author

blizzz commented Nov 20, 2015

Adding it later does not sound too desirable. If you need to determine those parents for millions of comments upon update. Well, you could skip that and only determine that column on demand and/or specific cli call, but we'd need to carry this load forever. Better we do it now or not, let's do this. In our first implementation, it'll be always 0 anyways.

@blizzz
Copy link
Contributor Author

blizzz commented Nov 23, 2015

we need another field, see https://github.com/owncloud/core/pull/20562/files#r45613011. I'll add it to the description.

@blizzz blizzz closed this as completed in 6bd343a Nov 23, 2015
DeepDiver1975 added a commit that referenced this issue Nov 23, 2015
DB scheme for Comments table, resolves #20265
@lock
Copy link

lock bot commented Aug 6, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Aug 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants