AO3 News

Release 0.9.20: Improvements to our search index code!

Published: 2014-09-09 16:43:05 -0400

Credits

  • Coder: Elz
  • Code reviewers: Enigel, james_
  • Testers: Ariana, Lady Oscar, mumble, Ridicully, sarken

Overview

With today's deploy we're making some changes to our search index code, which we hope will solve some ongoing problems with suddenly "missing" works or bookmarks and inaccurate work counts.

In order to improve consistency and reduce the load on our search engine, we'll be sending updates to it on a more controlled schedule. The trade-off is that it may take a couple of minutes for new works, chapters, and bookmarks to appear on listing pages (e.g. for a fandom tag or in a collection), but those pages will ultimately be more consistent and our systems should function more reliably.

You can read on for technical details!

The Problem

We use a software package called Elasticsearch for most of our search and filtering needs. It's a powerful system for organizing and presenting all the information in our database and allows for all sorts of custom searches and tag combinations. To keep our search results up to date for everyone using the Archive, we need to ensure that freshly-posted works, new comments and kudos, edited bookmarks, new tags, etc. all make it into our search index practically in real time.

As the volume of updates has grown considerably over the last couple of years, however, that's increased the time it takes to process those updates and slowed down the general functioning of the underlying system. That slowness has interacted badly with the way we cache data in our current code: works and bookmarks seem to occasionally appear and disappear from site listings and the counts you see on different pages and sidebars may be significantly different from one another.

That's understandably alarming to anyone who encounters it, and fixing it has been our top priority.

The First Step

We are making some major changes to our various "re-indexing" processes, which take every relevant change that happens to works/bookmarks/tags and update our massive search index accordingly:

  • Instead of going directly into Elasticsearch, all indexing tasks will now be added to a queue that can be processed in a more orderly fashion. (We were queueing some updates before, but not all of them.)
  • The queued updates will then be sent to the search engine in batches to reduce the number of requests, which should help with performance.
  • Cached pages get expired (i.e., updated to reflect new data) not when the database says so, but when Elasticsearch is ready.
  • Updates concerning hit counts, kudos, comments, and bookmarks on a work (i.e. "stats" data) will be processed more efficiently but less frequently.

As a result, work updates will take a minute to affect search results and work listings, and background changes to tags (e.g. two tags being linked together) will take a few minutes longer to be reflected in listings. Stats data (hits, kudos, etc.) will be added to the search index only once an hour. The upside of this is that listings should be more consistent across the site!

(Please note that this affects only searching, sorting, and filtering! The kudos count in a work blurb, for example, is based on the database total, so you may notice slight inconsistencies between those numbers and the order you see when sorting by kudos.)

The Next Step

We're hoping that these changes will help to solve the immediate problems that we're facing, but we're also continuing to work on long-term plans and improvements. We're currently preparing to upgrade our Elasticsearch cluster from version 0.90 to 1.3 (which has better performance and backup tools), switch our code to a better client, and make some changes to the way we index data to continue to make the system more efficient.

One big improvement will be in the way we index bookmarks. When we set up our current system, we had a much smaller number of bookmarks relative to other content on the site. The old Elasticsearch client we were using also had some limitations on its functionality, so we ended up indexing the data for bookmarked works together with each of their individual bookmarks, which meant that updates to the work meant updates to dozens or hundreds of bookmark records. That's been a serious problem when changes are made to tags, in particular, where a small change can potentially kick off a large cascade of re-indexes. It's also made it more difficult to keep up with regular changes to works, which led to problems with bookmark sorting by date. We're reorganizing that, using Elasticsearch's parent-child index structure, and we hope that this will also have positive long-term effects on performance.

Overall, we're continuing to learn and look for better solutions as the Archive grows. We apologize for the bumpy ride lately, and we hope that the latest set of changes will make things run more smoothly. We should have more improvements for you in the coming months, and in the meantime, we thank you for your patience!

Comment

Release 0.9.18: Change Log

Published: 2014-08-28 17:09:45 -0400

Credits

  • Coders: Ariana, hill, james_, Marie, sarken, Scott, Stephanie Smith
  • Code reviewers: Ariana, Elz, james_
  • Testers: Lady Oscar, mumble, sarken

Details

  • The experimental "Hide my work from search engines when possible." preference was not properly applying the necessary markers to individual works. Now it does.
  • When a user tried to access a page that didn't exist, we previously displayed an error message and redirected the user to a more general page. We now properly show the 404 error page with a helpful hint about what content couldn't be found.
  • When trying to remove the name from a collection, you'd get an ugly error 500; now a proper error message is displayed that asks you to enter a name.
  • Rewrote the live validation code used for various error messages across the site, e.g. if you click into and then out of a comment field without typing anything, to make it more maintainable. (This was deployed as Release 0.9.17.)
  • Optimized the code we use to make sure usernames and passwords have the proper length when creating a new account or changing the password.
  • The label and input on the bookmark filters are now properly associated in the HTML, which is important for accessibility.
  • Fixed some mark-up in our header and footer code in preparation for more work on site translation.
  • Some mark-up on the "New Tag" page (accessible to wranglers) was wonky; now it's not wonky anymore.
  • Fixed various broken bits in our automated testing suite.

Known Issues

We are currently dealing with indexing and caching issues which mean works might suddenly go "missing" from a tag listing, or a user's own works page. The work is still in the database, but the search index is intermittently losing track of it. Please bear with us as we work to solve these problems!

See our Known Issues page for current issues.

Comment

Release 0.9.16: Change Log

Published: 2014-08-12 17:17:41 -0400

Welcome to Release 0.9.16, in which we declare our frantic multi-part releases over, and go back to frantic one-part deploys (which doesn't really make much of a difference except for our Release Notes titles). In the past five months, we've fixed about 200 bugs and gone from eight pages of queued up code submissions down to one. \o/ With that done, we can now take the opportunity to look at our backlog of planned new features and enhancements and consider our strategy for the rest of the year. Onward!

Credits

  • Coders: james_, openendings, sarken, Scott, Stephanie Smith
  • Code reviewers: Enigel, sarken
  • Testers: Ariana, Lady Oscar, Runt, sarken, Scott

Details

  • Works & Subscriptions
    • We changed some elements of the "Edit Chapter" form to make the button layout, formatting, and behavior more like that of the "Edit Work" form.
    • Changed the message at the end of the kudos listing for works with more than 50 kudos to say "and 1 more user" or "and X more users" depending on whether there are one or more hidden kudos. (Previously the message said "and X more user(s)" in both cases.)
    • Using the "Subscribe" button on a multi-chaptered work no longer redirects the user to the first chapter.
    • Previously, unsubscribing from a work redirected the user to the last page visited, even if it was opened in another tab. Now, unsubscribing should not redirect the user.
  • Users & Accounts
    • Changing only the capitalization of a user name left the user with the original capitalization as their default pseud. It should now work normally, with the user name set to the new capitalization and no extra pseud created.
    • Submitting the "Edit My Profile" form will now bring the user to the Profile page to see the changes, rather than just leaving the form open.
    • We made some changes to the settings our administrators use to control account creation on the Archive. The buttons on the Archive front page will change to match the chosen settings: currently, new accounts require an invite, so the front page asks you to add yourself to our invite queue if you are not logged in.
  • Collections & Challenges
    • Because collection names cannot contain spaces, long names were failing to wrap properly, instead running out of the blurb and overlapping with other components of the page. They are now forced to wrap to stay within the blurb.
    • It was previously possible to open signups for a challenge with anomalous dates. Now, trying to save challenge settings with sign-ups open and an opening date in the future, a closing date in the past, or a closing date before the opening date, will give an error message.
  • Misc.
    • The "live validation" error messages that appear under many Archive form fields when too many or too few characters are entered were causing the other elements of the form to move up or down in a distracting way as they appeared and disappeared. The messages now appear overlaid on the form in popup rectangles, with the rest of the form staying put.
    • As a side-effect of a form layout change in our last update, the "All" and "None" buttons on the pages Tag Wranglers use to edit a tag's associations were selecting tags outside the button's section. This has now been fixed.
    • We added a colored ribbon to our Staging and Development environments to make it easier for our Testers and Coders to keep them straight from the actual Archive.

Known Issues

See our Known Issues page for current issues.

Comment

Release 0.9.15 (Part 9): Change Log

Published: 2014-07-28 23:53:14 -0400

Credits

  • Coders: Ariana, Elz, Enigel, Sarken, Scott, Stephanie Smith
  • Code reviewers: Enigel, james_
  • Testers: Lady Oscar, mumble, Sarken

Details

  • Subscriptions
    • Users' subscription pages previously listed all subscriptions on a single page, regardless of subscription type. Now series, work, and user subscriptions can be listed separately, and the lists are sorted alphabetically and separated into pages of 20 items to improve performance for users with hundreds or thousands of subscriptions.
  • Tag Sets
    • When a user nominates tags for a tag set, we provide tooltips to let them know when they've nominated a tag that is brand new to the Archive or a tag that exists but is neither a canonical tag nor a synonym of one. Now we also provide tooltips so users will know when they have nominated a canonical tag, a synonym of a canonical tag, or a canonical character or relationship tag that doesn't match the fandom tag they've nominated.
    • The list of tags a user has nominated in a tag set received some minor cosmetic changes to make it neater and more consistent with other areas of the site.
    • When a challenge's tag set included a very long tag (e.g. "Stephen Colbert's Alpha Squad 7: Lady Nocturne: A Tek Jansen Adventure - Stephen Colbert"), Firefox users were unable to see the full name of the tag on the challenge sign-up form. Now they can scroll horizontally to see the full tag.
    • It is now possible to delete a tag set nomination, clear all nominations for a tag set, or delete the tag set itself without having JavaScript enabled.
  • Challenges
    • The error message warning that required information was missing from a gift exchange or prompt meme sign-up previously did not specify which request(s) or offer(s) were missing information. Now a message will also appear above the specific request or offer with the problem.
    • Previously, it was impossible for the moderator of a prompt meme to delete the last prompt of a user's sign-up. Moderators can now remove the entire sign-up, making it easier to keep bogus prompts out of a challenge.
  • Misc.
    • When a creator removed the only work in a series by editing the work and choosing the "Remove" button, they were redirected to the now nonexistent series page, resulting in an error. This has been fixed to redirect the creator to their dashboard.

Known Issues

See our Known Issues page for current issues.

Comment

Release 0.9.15 (Part 8): Change Log

Published: 2014-07-13 12:45:00 -0400

Credits

  • Coders: Enigel, james_, sarken, Scott, Stephanie Smith
  • Code reviewers: Enigel, james_, sarken
  • Testers: Ariana, Enigel, Etharei, james_, Lady Oscar, mumble

Details

Important: We've been battling problems with our indexing process, which updates the search index for works and bookmarks when things are posted, updated, or otherwise changed in significant ways. While no actual data has been lost, we've been receiving reports of works or bookmarks not showing up where they should (e.g. work listings) or only after long delays.

As of this deploy, we've made some changes that should update the work index immediately upon a change, and refresh the bookmark index in batches (currently, once every 24 hours). This should help keep bookmark lists from being completely out of order, but does mean that some updates still won't show right away. We're working on more permanent improvements!

  • Works & Tags
    • Previously, "Choose Not To Use Archive Warnings" was selected by default in the posting form. We removed the default selection, to prevent unintended warning combinations when selecting additional warnings.
    • We also made sure the tag says "Creator Chose Not To Use Archive Warnings" everywhere else on the site, e.g. in the Sort & Filter sidebar. (We switched from "Author" to be more inclusive of non-text fanworks.)
    • Following a link to a deleted chapter would throw an error if the work it belonged to had also been deleted. Now it redirects either to the main Works index (with an error message), or to the work's first chapter if the work still exists.
    • Added a missing CSS class to the HTML mark-up for tag pages.
    • Cleaned up duplicate indexes in our database.
  • Collections & Tag Sets
    • A few years ago, we set up static pages for Collections to battle heavy load on our servers, e.g. during Yuletide reveal. Now that we regularly handle a lot more traffic than in 2011, the code for static versions of Collections has been removed.
    • An unapproved work would appear on a moderated Collection's dashboard (but not actually in the work listing) if it was also added to an unmoderated collection. This has been fixed.
    • When editing a work in an unmoderated collection to add it to another, moderated collection, there would be no message to the work creator that the work still needed to be approved by the collection mod. This has been fixed.
    • A user's Assignments page had a button that would allow them to send an email to their recipient as the Collection maintainer. This has been removed.
    • In Tag Sets with Ratings, Warnings, or Categories, the respective options (e.g. F/F, F/M, Gen) would be listed without any commas between them. This has been fixed.
    • On Tag Set nominations pages, the hover text for the ?! icon on unreviewed tags claimed they could be edited even after nominations were closed. It now just says they still need to be reviewed.
    • Cleaned up several HTML mark-up problems on Tag Set pages.

Known Issues

See our Known Issues page for current issues.

Comment

Release 0.9.15 (Part 7): Change Log

Published: 2014-07-01 12:33:37 -0400

Credits

  • Coders: james_, Lady Oscar, sarken
  • Code reviewers: Enigel, james_
  • Testers: Ariana, Enigel, james_, Lady Oscar, Runt

This deploy includes some updates to the Terms of Service FAQ. The question "May I post someone else's fanworks, giving them credit?" has been updated and the question "What about character playlists or fanmixes?" was added.

Details

  • Works
    • We have created a clearer and more detailed description of orphaning to be shown on the Orphan Works confirmation page. Hopefully this will make it less likely for users to orphan works in error.
    • .MOBI downloads of single and multi-chaptered works had different margin sizes. We have corrected this issue, and all works should have the same size margin.
    • When a user without any posted works looked at their Statistics page a message was displayed listing the types of information that would be displayed for any future works, including download statistics. Download statistics are not something we track, so that information has been removed.
  • Front-End Fixes
    • There was some incorrect HTML on the Sign-Ups page of challenges. Requests/Offers buttons are now properly coded as list items.
    • We also made some HTML changes to the Statistics page that won't alter anything visibly but which will bring it into line with our standard front end design.
    • Hovering over the ?! or ✔ or ✖ icons on the 'My Nominations' page shows a tooltip explaining what each respective icon means. The background color behind the text is now blue, in keeping with our standard informational messages, rather than yellow, which would indicate a warning message.
    • Previously, when a user viewed their nominations for a Tag Set, the "Status" message on the page always claimed that it was possible to edit or delete the nominations. Once a Tag Set is closed for nominations, however, the nominator can no longer edit or delete. The message will now change to accurately reflect the current state of the Tag Set.
    • There was some unnecessary HTML on the Works and Bookmarks index pages that created an empty navigation element. It has been removed.
    • Work blurbs on user and Collection Dashboard pages were getting extra padding between the title/author line and the fandom tag(s). They should now look the same as the blurbs on work listing pages.
    • There was a redundant reference and an unused selector in our stylesheets; both have been removed.

Known Issues

See our Known Issues page for current issues.

Comment

Release 0.9.15 (Part 6): Change Log

Published: 2014-06-27 16:16:13 -0400

Credits

  • Coders: Enigel, Lady Oscar, sarken, Scott
  • Code reviewers: Enigel, sarken
  • Testers: Ariana, Emilie, highlander_ii, Lady Oscar, mumble, Runt, sarken

Details

  • Works & Bookmarks
    • Trying to access and save changes to a multi-chapter draft with notes (!) would cause an error 500. This is fixed now, with thanks to the intrepid user who helped us figure this out!
    • In the posting/editing form, the autocomplete fields were not properly associated with their labels (e.g. Fandoms, Characters, Collections/Challenges, etc.), making it almost impossible to use the form with screenreaders. This is now fixed.
    • In the posting/editing form, the autocomplete fields for tags would not find certain tags with quotes or parentheses in them (e.g. typing Bucky wouldn't suggest James "Bucky" Barnes). Those tags should now show up for the appropriate searches.
    • In HTML tables with the <caption> element, the caption was hidden by CSS, but created a huge gap above the table. Table captions are now displayed, and the gap was fixed.
    • After we added horizontal scrolling for large images, some users were reporting vertical scrollbars on some works. This should now be fixed.
    • In your History and Marked for Later list, deleted works would leave behind a "(Deleted work)" blurb, with no way to remove it from your list. You can now remove it.
    • When adding tags to a bookmark, commas in Chinese and Japanese scripts were not parsed as tag separators, leading to one long, smushed-together tag. This has been fixed.
  • Collections & Challenges
    • It wasn't possible to delete a collection without JavaScript enabled. Now it is!
    • The sign-up summary for challenges was just a blank page when the challenge included no tags at all (e.g. just relied on written descriptions of the prompts). We now show a note when no tags are present to build a summary from.
  • Misc.
    • Tag use counts sometimes get out of sync; we've added a button that allows wranglers to fix the count if they run into such a tag.
    • We updated the Bootstrap drop-down plugin used for the main navigation.
    • We "humanized" code elements used in error messages across the site by adding spaces and switching from uppercase to lowercase. Things like, "We couldn't save this UserInviteRequest" should be much more readable now.
    • Cleaned up the HTML mark-up for pagination links (e.g. Previous | 1 | 2 | Next) across the site.
    • Updated the support form to have the correct limit on summary length (100 characters).

Known Issues

See our Known Issues page for current issues.

Comment

Release 0.9.15 (Part 5): Change Log

Published: 2014-06-17 16:00:07 -0400

Credits

  • Coders: hill, sarken, Scott
  • Code reviewers: Enigel, james_, Naomi
  • Testers: Ariana, Camilla M., Enigel, james_, Lady Oscar

Details

  • Front End Fixes
    • We had some CSS code stashed away in a sandbox file, waiting to be properly sorted. All our CSS definitions are now in the appropriate stylesheets.
    • Made a change so that tables in works will have visible light-on-dark text by default when using the Reversi Site Skin.
    • Gave work and bookmark indexes and list boxes consistent classes everywhere on the site.
    • Standardized use of the actions navigation subtype class so that it refers only to major navigational links to allow them to be more easily given the same style when using Site Skins.
  • Works & Bookmarks
    • The pagination on a user's Drafts page now uses the same button/arrow design as pagination elsewhere, such as on Works pages. (Please note that drafts should not be used long-term to store works in progress - always keep a backup!)
    • Trying to follow a link to a deleted series from the blurb of a deleted work (not the likeliest of scenarios) would sometimes lead to an unhelpful and unstyled error; it now generates a proper redirect and message.
    • Co-authored works would lead to gift/related work/prompt fill notifications with exposed HTML code. All emails now have fixed HTML versions.
    • When viewing or editing a bookmark, there was a "Back to Bookmarks" button at the bottom, which was inconsistent with our site navigation. The button now says "My Bookmarks" or "Bookmarks by [user]", depending on the situation, and is consistently placed.
    • In the inbox, comments from logged-in users had lost their timestamps (oops). We brought them back and also corrected misleading information in our Preferences help text while we were at it: Your own comments will never show up in your Archive Inbox, but we can email you a copy if you untick the "Turn off copies of your own comments" option in your Preferences.

Known Issues

See our Known Issues page for current issues.

Comment


Pages Navigation