Skip to content

Count Objects not working in some classes #8502

Open
@MrMartinR

Description

@MrMartinR

New Issue Checklist

  • I am not disclosing a vulnerability.
    I am not just asking a question.
    I have searched through existing issues.
    I can reproduce the issue with the latest versions of Parse Server and Parse Dashboard.

Issue Description

Dashboard doesn't count object in most of the classes

Steps to reproduce

Since the first installation I always had this issue...

Actual Outcome

Only showing '2' in the _Session class, the other classes show '0'

Expected Outcome

To show the total of objects in each class

Environment

Parse dashboard hosted on AWS Ubuntu EC2

Dashboard

  • Parse Dashboard version: 4.1.1
  • Browser: Safari, Safari Technology Preview Release, Firefox, Chrome
  • Browser version: Safari 15.5, Safari Technology Preview Release 146, Firefox 100.0.2, Chrome 102.0.5005.61.

Server

  • Parse Server version: 5.2.1
  • Operating system: macOS Monterrey
  • Local or remote host (AWS, Azure, Google Cloud, Heroku, Digital Ocean, etc): AWS Ubuntu EC2

Database

  • System (MongoDB or Postgres): Postgres
  • Database version: 14.2
  • Local or remote host (MongoDB Atlas, mLab, AWS, Azure, Google Cloud, etc): AWS

Logs

Screen Shot 2022-06-04 at 19 15 17

Activity

parse-github-assistant

parse-github-assistant commented on Jun 4, 2022

@parse-github-assistant

Thanks for opening this issue!

  • 🚀 You can help us to fix this issue faster by opening a pull request with a failing test. See our Contribution Guide for how to make a pull request, or read our New Contributor's Guide if this is your first time contributing.
added
type:bugImpaired feature or lacking behavior that is likely assumed
on Jun 4, 2022
mtrezza

mtrezza commented on Jun 4, 2022

@mtrezza
Member

Probably related: parse-community/parse-dashboard#1637

The issue above was reported to only happen on Postgres, not on MongoDB; same as this new issue. May be DB specific, and therefore possibly a Parse Server issue.

added
bounty:$10Bounty applies for fixing this issue (Parse Bounty Program)
on Jun 7, 2022
patelmilanun

patelmilanun commented on Apr 5, 2023

@patelmilanun
Member

it indeed is parse server issue as the count is coming from parse server only.

patelmilanun

patelmilanun commented on Apr 5, 2023

@patelmilanun
Member

i found the solution should i raise MR

it can be done using qs = `SELECT n_live_tup AS approximate_row_count FROM pg_stat_all_tables WHERE relname = $1;
instead of qs = 'SELECT reltuples AS approximate_row_count FROM pg_class WHERE relname = $1'; when doing count inside parse-server\src\Adapters\Storage\Postgres\PostgresStorageAdapter.js

mtrezza

mtrezza commented on Apr 9, 2023

@mtrezza
Member

Would this be a Parse Server or Parse Dashboard PR?

patelmilanun

patelmilanun commented on Apr 10, 2023

@patelmilanun
Member

Parse server it is

parse-github-assistant

parse-github-assistant commented on Apr 10, 2023

@parse-github-assistant
parse-github-assistant

parse-github-assistant commented on Apr 10, 2023

@parse-github-assistant
mtrezza

mtrezza commented on Apr 10, 2023

@mtrezza
Member

Moving the issue to Parse Server.

parseplatformorg

parseplatformorg commented on May 28, 2023

@parseplatformorg
Contributor

🎉 This change has been released in version 6.1.0-alpha.15

24 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bounty:$10Bounty applies for fixing this issue (Parse Bounty Program)state:releasedReleased as stable versionstate:released-alphaReleased as alpha versionstate:released-betaReleased as beta versiontype:bugImpaired feature or lacking behavior that is likely assumed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Participants

      @mtrezza@cbaker6@patelmilanun@MrMartinR@parseplatformorg

      Issue actions

        Count Objects not working in some classes · Issue #8502 · parse-community/parse-server