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

Old RECAPDocuments incorrectly re-indexed into the recap_sweep index #4936

Open
albertisfu opened this issue Jan 17, 2025 · 0 comments
Open

Comments

@albertisfu
Copy link
Contributor

@mlissner reported receiving a RECAP alert email containing old alerts mostly related to documents last updated in November 2024, which is unusual.

After investigating further, I confirmed that these alerts were triggered by the sweep index. I found the documents related to the alerts in the recap_sweep index. Additionally, I confirmed that the recap_sweep index was recreated today, Jan 17, at 8:01 UTC, so the issue does not appear to be caused by an outdated version of the index.

Using the following query:

GET recap_sweep/_search?pretty
{
  "query": {
    "bool": {
      "must": [
        {
          "match": {
            "docket_child": "recap_document"
          }
        }
      ]
    }
  },
  "_source":{
      "includes":[
         "timestamp"
      ]
   },
   "sort":[
      {
         "timestamp":{
            "order":"desc"
         }
      }
   ],
  "size":100,
  "track_total_hits":true
}

And then changing the sort order to asc:

I found that the newest RD in the index has a timestamp of: 2024-11-16T07:59:56,
and the oldest one has a timestamp of: 2024-11-15T08:00:00.

This is strange, as it seems it's re-indexing documents from November 16 instead of today.

The query that performs this re-indexing is:

{
                        "has_parent": {
                            "parent_type": "docket",
                            "query": {
                                "range": {
                                    "timestamp": {
                                        "gte": today_datetime_iso,
                                        "lt": next_day_utc_iso,
                                    }
                                }
                            },
                        }
                    }

I suspect that today_datetime_iso and next_day_utc_iso might be incorrect.

We need to investigate further to confirm whether this is a code bug or if the server time in the deployment environment is incorrect.

@mlissner mlissner moved this to Alerts Sprint in Sprint (Web Team) Jan 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Alerts Sprint
Development

No branches or pull requests

1 participant