Commit graph

31 commits

Author SHA1 Message Date
redmatrix
1029939f56 issues connecting to local forum 2015-11-15 17:28:45 -08:00
redmatrix
4b984f9819 filter delivery reports 2015-10-17 13:26:55 -07:00
redmatrix
5721f9f3a9 wrong table column names 2015-09-29 22:51:06 -07:00
redmatrix
cca9f2392e queue cleanup, and report issues 2015-09-29 22:11:10 -07:00
redmatrix
30e88a4f6b typo 2015-09-28 17:15:04 -07:00
redmatrix
e5f47cd14b create site records for all queued sites and check for death 2015-09-28 17:13:11 -07:00
redmatrix
2c665e5e4c add Diaspora (actually any external service which uses the queue) to delivery reports 2015-09-24 17:41:05 -07:00
redmatrix
0b1b11ea53 heavy lifting for delivery reports 2015-09-22 02:32:04 -07:00
redmatrix
e062c4e6b5 another tactic to deal with orphan hublocs from re-installs, or at least allow the descendant channel to survive 2015-09-11 14:30:07 -07:00
redmatrix
39f0e6fe62 add site_dead flag to prevent delivery to dead sites. Allow sys channel webpages to be viewed even if site is configured "block public". 2015-06-08 16:55:17 -07:00
friendica
0134a41015 more work on queue optimisations 2015-03-09 19:57:35 -07:00
friendica
ad3b4da3ff missing comma 2015-03-04 18:23:54 -08:00
friendica
1d5d80808c don't re-use $x 2015-03-04 18:11:47 -08:00
friendica
011ccd57f6 add queue priority 2015-03-04 17:56:07 -08:00
Habeas Codice
ac27db22c1 Merge remote-tracking branch 'upstream/master'
Conflicts:
	boot.php
	include/dba/dba_driver.php
	include/diaspora.php
	include/follow.php
	include/session.php
	include/zot.php
	mod/photos.php
	mod/ping.php
2014-11-13 13:06:31 -08:00
Habeas Codice
1a5a5c7edb PostgreSQL support initial commit
There were 11 main types of changes:
- UPDATE's and DELETE's sometimes had LIMIT 1 at the end of them. This is not only non-compliant but
it would certainly not do what whoever wrote it thought it would. It is likely this mistake was just
copied from Friendica. All of these instances, the LIMIT 1 was simply removed.
- Bitwise operations (and even some non-zero int checks) erroneously rely on MySQL implicit
integer-boolean conversion in the WHERE clauses. This is non-compliant (and bad programming practice
to boot). Proper explicit boolean conversions were added. New queries should use proper conventions.
- MySQL has a different operator for bitwise XOR than postgres. Rather than add yet another dba_
func, I converted them to "& ~" ("AND NOT") when turning off, and "|" ("OR") when turning on. There
were no true toggles (XOR). New queries should refrain from using XOR when not necessary.
- There are several fields which the schema has marked as NOT NULL, but the inserts don't specify
them. The reason this works is because mysql totally ignores the constraint and adds an empty text
default automatically. Again, non-compliant, obviously. In these cases a default of empty text was
added.
- Several statements rely on a non-standard MySQL feature
(http://dev.mysql.com/doc/refman/5.5/en/group-by-handling.html). These queries can all be rewritten
to be standards compliant. Interestingly enough, the newly rewritten standards compliant queries run
a zillion times faster, even on MySQL.
- A couple of function/operator name translations were needed (RAND/RANDOM, GROUP_CONCAT/STRING_AGG,
UTC_NOW, REGEXP/~, ^/#) -- assist functions added in the dba_
- INTERVALs: postgres requires quotes around the value, mysql requires that there are not quotes
around the value -- assist functions added in the dba_
- NULL_DATE's -- Postgres does not allow the invalid date '0000-00-00 00:00:00' (there is no such
thing as year 0 or month 0 or day 0). We use '0001-01-01 00:00:00' for postgres. Conversions are
handled in Zot/item packets automagically by quoting all dates with dbescdate().
- char(##) specifications in the schema creates fields with blank spaces that aren't trimmed in the
code. MySQL apparently treats char(##) as varchar(##), again, non-compliant. Since postgres works
better with text fields anyway, this ball of bugs was simply side-stepped by using 'text' datatype
for all text fields in the postgres schema. varchar was used in a couple of places where it actually
seemed appropriate (size constraint), but without rigorously vetting that all of the PHP code
actually validates data, new bugs might come out from under the rug.
- postgres doesn't store nul bytes and a few other non-printables in text fields, even when quoted.
bytea fields were used when storing binary data (photo.data, attach.data). A new dbescbin() function
was added to handle this transparently.
- postgres does not support LIMIT #,# syntax. All databases support LIMIT # OFFSET # syntax.
Statements were updated to be standard.

These changes require corresponding changes in the coding standards. Please review those before
adding any code going forward.

Still on my TODO list:
- remove quotes from non-reserved identifiers and make reserved identifiers use dba func for quoting
- Rewrite search queries for better results (both MySQL and Postgres)
2014-11-13 12:21:58 -08:00
friendica
285d6f61e4 I'm going to try again with the conversation request packets. I've looked this over and tested a lot of edge cases, and thought about from every angle I can think of to prevent looping. I don't *think* this can loop. I also doubt that this is the problem at friendicared.de, but I don't know for sure what that problem might be. 2014-11-02 15:28:20 -08:00
friendica
28a35261db What this checkin does is catch the case where a comment arrived and there's a missing top-level post to match it with. So we'll send a request back to the sender that you've never seen this thread and please send a fresh copy of the entire conversation to date. We could soon have posts in the matrix from different platforms from days gone by, which have been migrated into the modern world. We'll be polite and not deliver these to everybody. However, if someone comments on one of these antique threads we wouldn't be able to see it in our own matrix because we won't have a copy of the parent post. So this rectifies that situation. Be aware that item deletion may need to change to keep "hard deleted" items indefinitely so that they don't keep coming back. We'll have to null out the important data of the former item to accomplish the deletion aspect. 2014-10-30 19:15:03 -07:00
friendica
88f8900ac5 various diaspora issues 2014-08-29 17:31:40 -07:00
friendica
c6b67518d6 more queue tweaks 2014-08-28 22:55:40 -07:00
friendica
8a62b824f9 lots of little Diaspora issues 2014-08-28 21:49:13 -07:00
friendica
6a42d6fe3b works one way sort of - now to go the other way - which will require fixing a whole slew of FIXMEs 2014-08-26 18:58:48 -07:00
friendica
289ec34ae6 take off the kid gloves 2014-08-26 16:35:06 -07:00
friendica
7a082394c3 minor adjustments 2014-07-01 22:02:36 -07:00
friendica
b3fe221b7f issue #240 - we were using htmlentities instead of htmlspecialchars in several places, and this was a bit greedy in the set of characters which were converted from utf-8 to HTML entities. Also brought mail attachments up to date so they are rendered identically to item attachments. 2013-12-11 23:13:36 -08:00
friendica
de9aee8a07 block forgeries 2013-10-02 02:50:02 -07:00
friendica
765d6e0a97 push refresh messages, performance work on conversations and configs, doc updates 2013-06-14 16:54:58 -07:00
friendica
ea3940c4b0 start formatting for Doxygen 2013-02-25 17:09:40 -08:00
friendica
791302f317 more delivery diagnostics 2012-12-31 14:45:26 -08:00
friendica
7b4a92146f local delivery 2012-12-02 20:54:20 -08:00
friendica
194ef02c28 DATABASE: outq additions, delivery now getting the notify across to the other side 2012-11-19 16:51:15 -08:00