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

Where are my archived projects at? [Epic2] #782

Closed
jordanh opened this issue Mar 6, 2017 · 4 comments
Closed

Where are my archived projects at? [Epic2] #782

jordanh opened this issue Mar 6, 2017 · 4 comments
Assignees
Labels

Comments

@jordanh
Copy link
Contributor

jordanh commented Mar 6, 2017

Issue - Bug

While poking around on staging, I was doing some testing.

I:

  1. Logged in using my Google account
  2. Chose me demo team
  3. Ran a meeting, creating a new project for myself
  4. Archived it
  5. Navigated to the archive

And see:

image

Uh, oh! Where are my archived projects at?

I can also reproduce this locally using npm run dev.

@jordanh
Copy link
Contributor Author

jordanh commented Mar 6, 2017

Ah ha, here's the server exception:

Creating a pool connected to localhost:28015
1488779087725 - Origin: Worker (PID 97328)
   [Error] ReqlOpFailedError: Index `teamIdCreatedAt` was not found on table `actionDevelopment.Project` in:
r.table("Project").between(["team123", r.minval], ["team123", r.maxval], {
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    index: "teamIdCreatedAt"
    ^^^^^^^^^^^^^^^^^^^^^^^^
}).filter({
^^^^^^^^^^^
    isArchived: true
    ^^^^^^^^^^^^^^^^
}).pluck(["content", "id", "isArchived", "status", "teamMemberId", "updatedAt"]).changes({
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    includeInitial: true
    ^^^^^^^^^^^^^^^^^^^^
})

It looks like that index was still in use!

@jordanh jordanh reopened this Mar 10, 2017
@jordanh
Copy link
Contributor Author

jordanh commented Mar 10, 2017

The exception is fixed (I had to re-add the index by hand because an existing migration was changed), but I still don't see any archived items. There are no client exceptions, no new server exceptions.

When tracing the socket:

image

Looks like the sub goes out, but the server never responds with any archived items...

@mattkrick mattkrick mentioned this issue Mar 11, 2017
7 tasks
@mattkrick
Copy link
Member

this did the trick for me. can you try to cut n paste this?

  • r.db('actionDevelopment') .table('Project').indexCreate('teamIdCreatedAt', (row) => [row('teamId'), row('createdAt')])

@jordanh
Copy link
Contributor Author

jordanh commented Mar 11, 2017

Oh yes, that did it just fine! I made a mistake when re-adding the index to staging. I didn't make it a multi-index. Danke!

@jordanh jordanh closed this as completed Mar 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants